Report mothballed capacity - #1506
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1506 +/- ##
=======================================
Coverage 90.30% 90.31%
=======================================
Files 60 60
Lines 8658 8663 +5
Branches 8658 8663 +5
=======================================
+ Hits 7819 7824 +5
Misses 525 525
Partials 314 314 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds mothballed capacity and unit counts to asset_capacities.csv, with schema, release-note, code, and regression fixture updates.
Changes:
- Calculates and outputs mothballing metrics.
- Updates the output schema and release notes.
- Refreshes regression fixtures, including non-zero mothballing data.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/data/two_regions/asset_capacities.csv |
Updated regression fixture. |
tests/data/two_outputs/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_unit_size/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_shadow/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_npv/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_mothball/asset_capacities.csv |
Updated fixture with mothballing data. |
tests/data/simple_marginal/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_marginal_average/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_ironing_out/asset_capacities.csv |
Updated regression fixture. |
tests/data/simple_full/asset_capacities.csv |
Updated regression fixture. |
tests/data/muse1_default/asset_capacities.csv |
Updated regression fixture. |
tests/data/missing_commodity/asset_capacities.csv |
Updated regression fixture. |
tests/data/circularity/asset_capacities.csv |
Updated regression fixture. |
tests/data/circularity_npv/asset_capacities.csv |
Updated regression fixture. |
src/output.rs |
Writes and tests the new CSV fields. |
src/asset.rs |
Calculates mothballed capacity and unit counts. |
schemas/output/asset_capacities.yaml |
Documents the new output columns. |
docs/release_notes/upcoming.md |
Records the output-format change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dalonsoa
left a comment
There was a problem hiding this comment.
I've a question, but otherwise the code looks good.
There was a problem hiding this comment.
So, in this example, the cases where there's mothballed capacity, the whole capacity is mothballed, right? There is no actual capacity not mothballed? Or does it means there is equal capacity mothballed and not?
There was a problem hiding this comment.
Yes, in this case all capacity is mothballed
Description
Adds columns for
mothballed_capacityandmothballed_unitstoasset_capacities.csv, allowing users to see information about capacity mothballing. Most example models havemothball_years = 0(essentially mothballing is turned off), so this just adds columns full of zeros, but thesimple_mothballhas some real mothballing data in these columns.Fixes #1461
Type of change
Key checklist
$ cargo test$ cargo docpresent in the previous release
Further checks