Skip to content

Pass handle_missing_countries param to build_dh_areas rule - #2364

Draft
louisschlegel wants to merge 2 commits into
PyPSA:masterfrom
louisschlegel:fix-dh-areas-params
Draft

louisschlegel wants to merge 2 commits into
PyPSA:masterfrom
louisschlegel:fix-dh-areas-params

Conversation

@louisschlegel

@louisschlegel louisschlegel commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2359

Changes proposed in this Pull Request

scripts/build_dh_areas.py reads snakemake.params["handle_missing_countries"], but the build_dh_areas rule had no params block. This adds it, reading sector: district_heating: dh_areas: handle_missing_countries from the config.

Tested by running build_dh_areas with the dh_areas dataset (341.5) and onshore regions including a country without DH data (AL). On master it fails with AttributeError: 'Params' object has no attribute 'handle_missing_countries'; with this change the rule completes and AL is filled.

Checklist

Required:

  • Changes are tested locally and behave as expected.
  • Code and workflow changes are documented.
  • A release note entry is added to doc/release_notes.md.
  • The description is human-written and any AI-generated content is marked.

If applicable:

  • Changes in configuration options are reflected in scripts/lib/validation.
  • For new data sources or versions, these instructions have been followed.
  • New rules are documented in the appropriate doc/*.md files.

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.

Missing handle_missing_countries parameter in build_dh_areas rule

1 participant