Skip to content

Conversation

@khaeru
Copy link
Member

@khaeru khaeru commented Nov 28, 2025

How to review

  • Read the diff, in particular the added tests and docs (section on "Historical and reference values").
  • Note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update release notes.

@khaeru khaeru added this to the 3.12 milestone Nov 28, 2025
@khaeru khaeru self-assigned this Nov 28, 2025
@khaeru khaeru added bug Doesn't work as advertised/unintended effects enh New features & functionality reporting labels Nov 28, 2025
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 95.78947% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.3%. Comparing base (ae12261) to head (a7440e2).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
message_ix/testing/__init__.py 71.4% 6 Missing ⚠️
message_ix/tests/test_report.py 98.4% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main    #991    +/-   ##
======================================
  Coverage   92.2%   92.3%            
======================================
  Files         60      60            
  Lines       5155    5260   +105     
======================================
+ Hits        4756    4855    +99     
- Misses       399     405     +6     
Files with missing lines Coverage Δ
message_ix/common.py 100.0% <100.0%> (ø)
message_ix/report/__init__.py 100.0% <100.0%> (ø)
message_ix/report/operator.py 97.6% <100.0%> (+0.3%) ⬆️
message_ix/tests/test_tutorials.py 96.4% <ø> (ø)
message_ix/tests/test_report.py 99.0% <98.4%> (+0.3%) ⬆️
message_ix/testing/__init__.py 98.3% <71.4%> (-1.7%) ⬇️

@khaeru
Copy link
Member Author

khaeru commented Dec 1, 2025

@Tyler-lc @junukitashepard FYI this PR will fix the two reporting issues we discussed last week. Per the PR checklist, I still need to update/expand the documentation to cover the features. You can wait until I do that and request review, or if curious you can check the tests to see the expected behaviour.

@Tyler-lc
Copy link
Contributor

Tyler-lc commented Dec 1, 2025

I had a look at the diff and now it seems that historical and reference activities will be calculated with yv==ya right? But no choice regarding the method, at least for now. Which is fine by me. Just wanted to make sure that is the case.

khaeru added a commit that referenced this pull request Dec 1, 2025
khaeru added a commit that referenced this pull request Dec 1, 2025
- Reorder, expand, and copyedit docs of default reporter contents.
- Add #988, #989 to release notes.
@khaeru
Copy link
Member Author

khaeru commented Dec 1, 2025

I had a look at the diff and now it seems that historical and reference activities will be calculated with yv==ya right? But no choice regarding the method, at least for now. Which is fine by me. Just wanted to make sure that is the case.

Actually there is a choice. I've now updated the docs; please see the preview build here which is supposed to explain. In brief:

  1. in:*:historical+current is the key to use for yV==yA.
  2. in:*:historical+weighted is the key to use a weighted average across all historical vintages yV<=yA.
    • The docs explain that these shares have to be provided by the user.

The test (that was already on the branch) checks that (a) an exception is raised if the user does not provide share data and (b) the calculation succeeds if they do.

khaeru added a commit that referenced this pull request Dec 1, 2025
khaeru added a commit that referenced this pull request Dec 1, 2025
- Reorder, expand, and copyedit docs of default reporter contents.
- Add #988, #989 to release notes.
- Globals, fixtures, tests.
- Collect tests of Reporter class in TestReporter.
- Alphabetize.
khaeru added a commit that referenced this pull request Dec 2, 2025
- Reorder, expand, and copyedit docs of default reporter contents.
- Add #988, #989 to release notes.
@khaeru khaeru marked this pull request as ready for review December 2, 2025 11:30
@junukitashepard
Copy link

Thanks @khaeru. I have tested the updates for historical out and it works as intended.

Copy link

@junukitashepard junukitashepard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this historical output for my work and the update works as intended.

khaeru added a commit that referenced this pull request Dec 4, 2025
- Reorder, expand, and copyedit docs of default reporter contents.
- Add #988, #989 to release notes.
- Reorder, expand, and copyedit docs of default reporter contents.
- Add #988, #989 to release notes.
- Bump ixmp commit in doc/requirements.txt.
@khaeru khaeru merged commit b1a9994 into main Dec 4, 2025
28 checks passed
@khaeru khaeru deleted the issue/988 branch December 4, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Doesn't work as advertised/unintended effects enh New features & functionality reporting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add out_hist and in_hist to Reporter Calling Reporter.from_scenario() causes MissingKeyError

3 participants