Skip to content

Validate that lines: types defines the 380 kV level - #2365

Merged
fneum merged 2 commits into
PyPSA:masterfrom
louisschlegel:validate-380kv-line-type
Oct 12, 2026
Merged

fneum merged 2 commits into
PyPSA:masterfrom
louisschlegel:validate-380kv-line-type

Conversation

@louisschlegel

Copy link
Copy Markdown
Contributor

Closes #2166

Changes proposed in this Pull Request

Adds a field validator on lines: types so the config fails early with a clear message when no line type is defined for the 380 kV level, instead of the workflow failing later (e.g. in simplify_network when lines are mapped to 380 kV).

Tests added in test/test_config_schema.py for the default config and for a config without the 380 kV entry (pytest test/test_config_schema.py: 32 passed, 1 skipped).

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.

@fneum
fneum marked this pull request as ready for review October 12, 2026 09:34
@fneum
fneum merged commit 647ee5d into PyPSA:master Oct 12, 2026
9 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.

Field validator for 380kV lines

2 participants