Repository navigation
Conversation
for more information, see https://pre-commit.ci
Member
|
Yes, also included I think in #326 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-assisted.
Problem
The configuration defines
clean_name.fueltypes_with_blocks, butaggregate_units()looked up the misspelled keyclean_name.fuel_type_with_blocks.Because that key was absent, aggregation treated the list as empty and applied no fuel-type filter. As a result, fuels configured to retain block labels—Nuclear by default—were still eligible for aggregation. Units with matching plant names could be merged, even though name cleaning preserved their block labels.
Fix
Correct the spelling, further add a "not in" to the previously skipped query formulation and add a safeguard for empty lists.
Impact
With cached sources, the nuclear-only comparison showed 14 more matched entries (238 → 252) with reported capacity unchanged at 191,070 MW.
Copilot report
Nuclear block-aggregation impact
Compared the default nuclear matching workflow with aggregation exclusion disabled (the pre-fix behavior), against the same workflow with
Nuclearinclean_name.fueltypes_with_blocks. Both runs retained nuclear block labels and used the current matching/source filters. The target was restricted to Nuclear; all 19 required input files were already cached, so no source data was downloaded.Only France and the United Kingdom had different row counts:
For example, Dungeness A changed from one 460 MW entry to two 230 MW entries (A1 and A2). Other source memberships also shifted (ENTSOE-linked rows 92 → 89; OPSD-linked rows 97 → 104), consistent with changed matching granularity.
Interpretation: With these cached inputs and the current source filters, enabling nuclear block exclusion adds 14 matched entries without increasing total reported nuclear capacity. This is a granularity change, not a retirement-accounting fix or a general guarantee against overlapping capacity in other configurations.
Reproduction: Run
pm.powerplants(..., update=True, fill_geopositions=False, filter_missing_geopositions=False)twice withtarget_fueltypesrestricted to Nuclear and distinct output hashes. For the before case, disable only the aggregation exclusion lookup; keep the default Nuclear block-name handling. For the after case, usefueltypes_with_blocks: [Nuclear].Checklist
docs.docs/release_notes.mdof the upcoming release is included.docs/contributors.md.