Skip to content

Maintenance: improve iiasa_database handling, update_config_from_wildcards, raise errors#102

Merged
lindnemi merged 12 commits intomainfrom
data-maintenance
Oct 15, 2025
Merged

Maintenance: improve iiasa_database handling, update_config_from_wildcards, raise errors#102
lindnemi merged 12 commits intomainfrom
data-maintenance

Conversation

@lindnemi
Copy link
Copy Markdown
Collaborator

@lindnemi lindnemi commented Jul 21, 2025

Changes are:

  • moved ariadne database from resources to data and simplified download
  • rename iiasa_database: to pypsa-de: in config
  • raise logger.errors
  • logger.info instead of print
  • update scenario config everywhere
  • eliminate a global variable in export_ariadne_variables

Before asking for a review for this PR make sure to complete the following checklist:

  • Workflow with target rule ariadne_all completes without errors
  • The logic of export_ariadne_variables has been adapted to the changes
  • One or several figures that validate the changes in the PR have been posted as a comment
  • A brief description of the changes has been added to Changelog.md
  • The latest main has been merged into the PR
  • The config has a new prefix of the format YYYYMMDDdescriptive_title

@lindnemi lindnemi changed the title Maintenance: improve iiasa_database handling Maintenance: improve iiasa_database handling, update_config_from_wildcards Jul 21, 2025
@lindnemi lindnemi changed the title Maintenance: improve iiasa_database handling, update_config_from_wildcards Maintenance: improve iiasa_database handling, update_config_from_wildcards, raise errors Jul 21, 2025
@lindnemi lindnemi requested a review from lkstrp July 21, 2025 11:27
@lindnemi
Copy link
Copy Markdown
Collaborator Author

  • since there are a lot of PRs at the moment, make sure the maintenance done here also applies to the state of main when merging

@lindnemi
Copy link
Copy Markdown
Collaborator Author

lindnemi commented Jul 21, 2025

Es waren neue Warnings aufgetaucht mit pypsa 0.35.1 deswegen habe ich die imports in plot_hydrogen_network_incl_kernnetz geändert

Copy link
Copy Markdown
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the missed review. This is some lovely clean up! Moving the ariadne database hopefully also resolves my CI problems

logger.error(
f"CO2 budget for countries other than `DE` is not yet supported. Found country {ct}. Please check the config file."
)
raise NotImplementedError(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we do that in Eur as well?

I'm not 100% sure if there was a reason to log errors instead of raising them with snakemake. I guess at the end it will not make a difference, since snakemake will either fail because a file is missing or because an error is raised, which will be more informative

)
except KeyError:
print(
logger.info(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger.warning instead of logger.info("warning: ..

@lindnemi lindnemi merged commit 43796cb into main Oct 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants