Raise error in tools.costs
when a technology is assigned a reduction rate for which it does not have value
#270
+23
−2
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.
Small PR to add an error in the costs tool in instances where a technology has a reduction category that is missing data
This issue came up in #235 (see @khaeru's comment here), where a technology was missing a reduction rate category in
cost_reduction.csv
that other technologies had. In this case, it didn't matter too much as that missing cost reduction category was never specified for that technology in thescenarios_reduction.csv
. However, a hypothetical was brought up: what happens if a technology is assigned a reduction category for a scenario, but said reduction category does not exist for said technology?I have added a few lines to check for these instances and if they exist, the tool should raise an error.
How to review
For @khaeru and/or @glatterf42 : Read the diff and note that the CI checks all pass.
PR checklist