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 30.30303% with 46 lines in your changes missing coverage. Please review.

Project coverage is 55.5%. Comparing base (4fd6446) to head (1034331).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
message_ix_models/tests/test_report.py 21.8% 43 Missing ⚠️
message_ix_models/report/config.py 60.0% 2 Missing ⚠️
message_ix_models/report/compat.py 0.0% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4fd6446) and HEAD (1034331). Click for more details.

HEAD has 12 uploads less than BASE
Flag BASE (4fd6446) HEAD (1034331)
15 3
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #178      +/-   ##
========================================
- Coverage   77.4%   55.5%   -21.9%     
========================================
  Files        217     217              
  Lines      16851   16907      +56     
========================================
- Hits       13048    9395    -3653     
- Misses      3803    7512    +3709     
Files with missing lines Coverage Δ
message_ix_models/cli.py 93.4% <ø> (ø)
message_ix_models/report/__init__.py 87.3% <100.0%> (-8.4%) ⬇️
message_ix_models/tests/report/test_legacy.py 55.0% <ø> (ø)
message_ix_models/report/compat.py 35.1% <0.0%> (-64.2%) ⬇️
message_ix_models/report/config.py 94.1% <60.0%> (-5.9%) ⬇️
message_ix_models/tests/test_report.py 68.2% <21.8%> (-31.8%) ⬇️

... and 65 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khaeru khaeru self-assigned this Apr 22, 2024
@khaeru khaeru force-pushed the enh/test-report branch 2 times, most recently from 9f91bdd to 7bc4db1 Compare August 6, 2024 12:48
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