Repository navigation
Ccaradon/measure doc assets - #464
Open
ChristopherCaradonna wants to merge 5 commits into
Open
ChristopherCaradonna wants to merge 5 commits into
ChristopherCaradonna wants to merge 5 commits into
Conversation
Introduce `measure_doc_assets` to generate upgrade-specific documentation tables, figures, and a manifest from cached plotting data. Wire it into `ComStockMeasureComparison` behind a new opt-in flag, document the workflow in `compare_upgrades.py.template`, and add focused pytest coverage plus pytest discovery for the new module.
Add every fuel total and the total utility bill to the plotting columns so exported caches retain those totals. Update export logic to rebuild missing totals from their component columns when working with older caches, and record that in the manifest notes. Add tests covering the new plotting columns and compatibility with older cache exports.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Nonstandard baseline IDs produce incorrect figures, and failed directory replacement can destroy valid prior assets.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds opt-in generation of measure-documentation tables, figures, and manifests from ComStock plotting data.
Changes:
- Adds asset generation and CLI support.
- Integrates generation into measure comparisons.
- Adds required plotting columns and tests.
| File | Description |
|---|---|
postprocessing/comstockpostproc/measure_doc_assets.py |
Generates documentation assets. |
postprocessing/comstockpostproc/comstock.py |
Retains required plotting totals. |
postprocessing/comstockpostproc/comstock_measure_comparison.py |
Adds opt-in export integration. |
postprocessing/compare_upgrades.py.template |
Documents export configuration. |
postprocessing/test/test_measure_doc_assets.py |
Tests asset generation. |
postprocessing/pytest.ini |
Registers the new tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
doc_assets exports now reject comparisons against any baseline other than ComStock upgrade 0, matching how savings columns are computed. The export process also keeps the current folder intact on failures, restores interrupted swaps, and cleans up stale partial/previous leftovers. CLI validation and tests were updated to cover the stricter baseline requirement and atomic swap behavior.
savings_distributions.csv now converts the site EUI savings columns from the plotting data's kWh/ft2 to kBtu/ft2, with the conversion the EUI violin plots use, so each row matches its figure. When the plotting code predates that conversion, the manifest notes that the EUI figures plot kWh/ft2 values on kBtu/ft2 axes.
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.

Pull request overview
Adds assets used to create measure documentation.
Pull Request Author
This pull request makes changes to (select all the apply):
Pull Request Author Checklist:
Pull Request Reviewer Checklist:
test/reporting_measure_tests.txt,test/workflow_measure_tests.txt, ortest/upgrade_measure_tests.txtComStock Licensing Language - Add to Beginning of Each Code File