-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wildcard aggregation by skipping (#448)
* Add external repo cleanup * Return variable name string directly * Update usage of vars_default_args * Add a simple test * Implement skipping region-aggregation for wildcard variables * Require that wildcard-variables have explicit skip-region-aggregation * Make ruff * Add region aggregation for wildcard aggregation test * Fix pydantic validator --------- Co-authored-by: Philip Hackstock <[email protected]>
- Loading branch information
1 parent
fb124b2
commit bfa80ff
Showing
13 changed files
with
124 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
tests/data/region_processing/skip_aggregation/mappings/model_a.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
model: m_a | ||
model: model_a | ||
native_regions: | ||
- region_A | ||
- region_B | ||
|
5 changes: 5 additions & 0 deletions
5
tests/data/region_processing/wildcard_skip_aggregation/dsd/region/regions.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- common: | ||
- World | ||
- model_native: | ||
- region_A | ||
- region_B |
4 changes: 4 additions & 0 deletions
4
tests/data/region_processing/wildcard_skip_aggregation/dsd/variable/variables.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Capital Cost|Electricity|*: | ||
definition: Capital cost of electricity generation for a specific technology | ||
unit: USD_2010/kW | ||
skip-region-aggregation: true |
8 changes: 8 additions & 0 deletions
8
tests/data/region_processing/wildcard_skip_aggregation/mappings/model_a.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
model: model_a | ||
native_regions: | ||
- region_A | ||
- region_B | ||
common_regions: | ||
- World: | ||
- region_A | ||
- region_B |
8 changes: 8 additions & 0 deletions
8
tests/data/region_processing/wildcard_skip_aggregation/mappings/model_b.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
model: model_b | ||
native_regions: | ||
- region_A | ||
- region_b: region_B | ||
common_regions: | ||
- World: | ||
- region_A | ||
- region_b |
This file contains 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
This file contains 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
This file contains 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
This file contains 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