Skip to content

fix: Correct DAG generation to respect all configuration sources#1678

Merged
fneum merged 3 commits intoPyPSA:masterfrom
thogin:fix/graphrules-config-handling
May 25, 2025
Merged

fix: Correct DAG generation to respect all configuration sources#1678
fneum merged 3 commits intoPyPSA:masterfrom
thogin:fix/graphrules-config-handling

Conversation

@thogin
Copy link
Copy Markdown
Contributor

@thogin thogin commented May 8, 2025

Ensures rulegraph and filegraph accurately reflect the final merged configuration. This includes:

  • Command-line config files (--configfile option)
  • Command-line config overrides (--config key=value)
  • Default config files loaded in the Snakefile

Previously, these rules could produce misleading visualizations if command-line configurations were used, as they did not fully account for these overrides and sources.

Technical Implementation:

  • Added dump_graph_config rule to capture the final Snakemake config.
  • Updated rulegraph and filegraph to use this captured config.
  • Added SVG output format for DAGs.
  • Enhanced error handling and logging in graph generation rules.

docs: Updated release notes.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

thogin and others added 2 commits May 8, 2025 16:10
Ensures `rulegraph` and `filegraph` accurately reflect the final merged
configuration. This includes:
- Command-line config files (--configfile option)
- Command-line config overrides (--config key=value)
- Default config files loaded in the Snakefile

Previously, these rules could produce misleading visualizations if
command-line configurations were used, as they did not fully account for
these overrides and sources.

Technical Implementation:
- Added `dump_graph_config` rule to capture the final Snakemake config.
- Updated `rulegraph` and `filegraph` to use this captured config.
- Added SVG output format for DAGs.
- Enhanced error handling and logging in graph generation rules.

docs: Updated release notes.
Copy link
Copy Markdown
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

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

Thanks!

@fneum fneum enabled auto-merge (squash) May 25, 2025 10:57
@fneum fneum merged commit dbdef10 into PyPSA:master May 25, 2025
12 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