Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test genno vs. legacy reporting #178

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Test genno vs. legacy reporting #178

wants to merge 11 commits into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Apr 19, 2024

This PR adds:

  1. A CSV file with the current output of the legacy reporting, run on snapshot-1.
  2. A new test, .test_report.test_compare(), and associated utility function that:
    • Runs the genno-based reporting on the stored solution data from snapshot-1.
    • Compares the output to the stored output from (1).

This functions as a test of known differences between the output of the legacy and genno-based reporting for this particular scenario. The added variable IGNORE can be extended and modified as the genno-based reporting is expanded towards feature parity with the legacy reporting.

Also:

  • Refine handling of "iamc:" sections in the reporting config YAML file.
  • Extend the legacy reporting config file default_units.yaml to suppress some of the many warnings about missing "conversion factors".
  • Add .report.Config.modules and .iter_callbacks().
  • Add at key "all::iamc" a task that concatenates IAMC-structured inputs; this can be extended by various modules (e.g. as is done in .compat).

How to review

TBA

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update doc/whatsnew.

@khaeru khaeru added report genno-based reporting and post-solve processing report-legacy Legacy reporting labels Apr 19, 2024
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 87.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 58.9%. Comparing base (5270640) to head (7bc4db1).
Report is 2 commits behind head on main.

Files Patch % Lines
message_ix_models/tests/test_report.py 83.9% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #178     +/-   ##
=======================================
+ Coverage   58.8%   58.9%   +0.1%     
=======================================
  Files        194     194             
  Lines      15159   15224     +65     
=======================================
+ Hits        8922    8978     +56     
- Misses      6237    6246      +9     
Files Coverage Δ
message_ix_models/cli.py 93.4% <ø> (ø)
message_ix_models/report/__init__.py 97.4% <100.0%> (+<0.1%) ⬆️
message_ix_models/report/compat.py 99.2% <100.0%> (+<0.1%) ⬆️
message_ix_models/report/config.py 100.0% <100.0%> (ø)
message_ix_models/tests/report/test_legacy.py 55.0% <ø> (ø)
message_ix_models/tests/test_report.py 94.4% <83.9%> (-5.6%) ⬇️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
report genno-based reporting and post-solve processing report-legacy Legacy reporting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant