Modify patch tests for pricing strategies#1324
Open
tsmbland wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1324 +/- ##
=======================================
Coverage 89.51% 89.51%
=======================================
Files 58 58
Lines 8537 8537
Branches 8537 8537
=======================================
Hits 7642 7642
Misses 580 580
Partials 315 315 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates regression patch tests and their expected outputs to reflect the new default pricing strategy (full_average), while keeping targeted coverage of the non-default pricing strategies via patches.
Changes:
- Replace the
simple_full_averagepatched regression test with a newsimple_shadowpatch test (electricity priced using shadow prices). - Update patch definitions to leave most commodities on the default strategy (blank/omitted
pricing_strategy) and only override the commodity under test. - Regenerate/update regression CSV fixtures across affected example datasets to match the new pricing defaults and resulting model outputs.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/example/patches.rs | Renames/removes the old full-average patch and defines the new simple_shadow patch; updates patched commodity pricing_strategy columns to rely on defaults where appropriate. |
| tests/regression.rs | Swaps patched regression coverage from simple_full_average to simple_shadow. |
| tests/data/two_regions/commodity_flows.csv | Updates expected two-regions flows (minor float diffs) after pricing default change. |
| tests/data/simple/debug_solver.csv | Updates expected objective values in debug output (minor float diffs). |
| tests/data/simple/commodity_flows.csv | Updates expected simple model flows (minor float diffs). |
| tests/data/simple_npv/commodity_flows.csv | Updates expected simple_npv flows (minor float diffs). |
| tests/data/simple_marginal/commodity_prices.csv | Updates expected prices for the marginal-electricity patched case under the new defaults. |
| tests/data/simple_marginal/commodity_flows.csv | Updates expected flows for the marginal-electricity patched case. |
| tests/data/simple_marginal/assets.csv | Updates expected asset build-out for the marginal-electricity patched case. |
| tests/data/simple_marginal/asset_capacities.csv | Updates expected capacities for the marginal-electricity patched case. |
| tests/data/simple_marginal_average/commodity_prices.csv | Updates expected prices for the marginal-average-electricity patched case under the new defaults. |
| tests/data/simple_marginal_average/assets.csv | Updates expected assets for the marginal-average-electricity patched case. |
| tests/data/simple_marginal_average/asset_capacities.csv | Updates expected capacities for the marginal-average-electricity patched case. |
| tests/data/simple_ironing_out/commodity_flows.csv | Updates expected flows for the ironing-out patched case (minor float diffs). |
| tests/data/simple_full/commodity_prices.csv | Updates expected prices for the full-cost gas patched case under the new defaults. |
| tests/data/simple_full/commodity_flows.csv | Updates expected flows for the full-cost gas patched case (minor float diffs). |
| tests/data/simple_divisible/commodity_flows.csv | Updates expected flows for the divisible-process patched case (minor float diffs). |
| tests/data/muse1_default/commodity_flows.csv | Updates expected flows for muse1_default (minor float diffs). |
| tests/data/missing_commodity/commodity_flows.csv | Updates expected flows for missing_commodity (minor float diffs). |
| tests/data/simple_shadow/commodity_prices.csv | Adds expected prices for the new shadow-electricity patched case. |
| tests/data/simple_shadow/commodity_flows.csv | Adds expected flows for the new shadow-electricity patched case. |
| tests/data/simple_shadow/assets.csv | Adds expected assets for the new shadow-electricity patched case. |
| tests/data/simple_shadow/asset_capacities.csv | Adds expected capacities for the new shadow-electricity patched case. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
I forgot to do this with #1281, but since we modified the default pricing strategy (from "shadow" to "full_average") we also need to modify the patch tests so they properly cover the remaining strategies in a targeted way