Skip to content

2026/feat/process demand refactor - #885

Merged
lisazeyen merged 5 commits into
2026/feat/process-demandfrom
2026/feat/process-demand-refactor
Aug 21, 2026
Merged

2026/feat/process demand refactor#885
lisazeyen merged 5 commits into
2026/feat/process-demandfrom
2026/feat/process-demand-refactor

Conversation

@daniel-rdt

Copy link
Copy Markdown
Member

Refactors #808.

Changes proposed in this Pull Request

This PR proposes a couple of refactorings mentioned in #808.

  • Makes use of the wildcard for the demand_type and gets rid of all of the individual rules. Instead introduces a global variable that maps the wildcard "nice name" to the file name prefix that we need for reading in that demand
  • Renames weather_year to weather_scenario
  • Moves the weather scenario option to the top level of the configuration
  • Refactors the logic of selecting weather scenarios. Specifies the available weather scenarios also as a global variable AVAILABLE_WEATHER_SCENARIOS and in the config, the user is only selecting which ones they want modelled. We are now falling back to the list of available ones when we check if the configured ones are valid.

Tasks

Workflow

Open issues

Notes

Checklist

Required:

  • Security scans show no high-severity bugs, critical vulnerabilities, or exposed secrets.
  • 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.
  • Changes in configuration options are added to config/test/*.yaml.
  • Multiple climate years test passes locally (pixi run -e open-tyndp tyndp-cyears-test).
  • For new data sources or versions, these instructions have been followed.
  • Open-TYNDP SPDX license header is added to all touched files.
  • Module docstrings are added to new Python scripts.
  • New rules are documented in the appropriate doc/*.md files.
  • Major features are documented in doc/index.md.

@daniel-rdt
daniel-rdt requested a review from lisazeyen August 20, 2026 12:56
@daniel-rdt daniel-rdt self-assigned this Aug 20, 2026
@daniel-rdt daniel-rdt added the SB Scenario Building label Aug 20, 2026
@daniel-rdt daniel-rdt mentioned this pull request Aug 20, 2026
10 tasks

@lisazeyen lisazeyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks @daniel-rdt for the suggestions! I will integrate your changes in the process demand PR.

@lisazeyen
lisazeyen merged commit 711c297 into 2026/feat/process-demand Aug 21, 2026
4 of 5 checks passed
@lisazeyen
lisazeyen deleted the 2026/feat/process-demand-refactor branch August 21, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SB Scenario Building TYNDP 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants