Skip to content

Transport improvements from 2025-W15 #328

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

Merged
merged 50 commits into from
May 13, 2025
Merged

Transport improvements from 2025-W15 #328

merged 50 commits into from
May 13, 2025

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Apr 7, 2025

#300 ← previous PR | following PR → #349

Not specific to transport:

  • New genno operator select_allow_empty().
  • Improve .util.MappingAdapter with an on_missing parameter/option and from_dicts() class method.
  • Improve log output from .check.ContainsDataForParameters.
  • .tools.iea.web.IEA_WEB: Drop the special handling for node=R12_MEA with transform=B option, added in [TODO link the PR]. We determined that this produces an incorrect aggregation, so it was likely based on incomplete information about the private code referenced there.

How to review

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 doc/whatsnew.

@khaeru khaeru added enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model labels Apr 7, 2025
@khaeru khaeru self-assigned this Apr 7, 2025
@khaeru khaeru force-pushed the transport/2025-w15 branch from ade757b to 031c7b3 Compare April 7, 2025 10:44
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 89.52703% with 31 lines in your changes missing coverage. Please review.

Project coverage is 77.8%. Comparing base (fdd4e60) to head (cef8c0e).
Report is 51 commits behind head on main.

Files with missing lines Patch % Lines
...sage_ix_models/tests/model/transport/test_build.py 65.8% 14 Missing ⚠️
message_ix_models/testing/check.py 0.0% 7 Missing ⚠️
message_ix_models/util/common.py 86.7% 7 Missing ⚠️
message_ix_models/util/importlib.py 92.8% 2 Missing ⚠️
...essage_ix_models/tests/model/transport/test_ldv.py 75.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #328     +/-   ##
=======================================
- Coverage   78.5%   77.8%   -0.8%     
=======================================
  Files        217     219      +2     
  Lines      17432   17495     +63     
=======================================
- Hits       13701   13614     -87     
- Misses      3731    3881    +150     
Files with missing lines Coverage Δ
message_ix_models/model/transport/base.py 97.9% <ø> (ø)
message_ix_models/model/transport/build.py 95.1% <100.0%> (+<0.1%) ⬆️
message_ix_models/model/transport/config.py 98.6% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/constraint.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/data.py 97.5% <100.0%> (+<0.1%) ⬆️
message_ix_models/model/transport/disutility.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/freight.py 100.0% <100.0%> (+17.5%) ⬆️
message_ix_models/model/transport/ldv.py 97.4% <100.0%> (-0.4%) ⬇️
message_ix_models/model/transport/operator.py 85.0% <100.0%> (ø)
message_ix_models/model/transport/other.py 100.0% <100.0%> (ø)
... and 22 more

... and 8 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 force-pushed the transport/2025-w15 branch from 031c7b3 to 6fb4f11 Compare April 14, 2025 11:41
@khaeru khaeru mentioned this pull request Apr 24, 2025
3 tasks
@khaeru khaeru force-pushed the transport/2025-w15 branch 4 times, most recently from 50a3432 to c79a871 Compare April 25, 2025 06:52
@khaeru khaeru force-pushed the transport/2025-w15 branch 6 times, most recently from 48bfd49 to d43d88c Compare May 4, 2025 22:36
@khaeru khaeru mentioned this pull request May 4, 2025
11 tasks
@khaeru khaeru force-pushed the transport/2025-w15 branch from d43d88c to b37c082 Compare May 4, 2025 23:26
@khaeru
Copy link
Member Author

khaeru commented May 5, 2025

I am seeing test failures like:

FAILED message_ix_models/tests/model/transport/test_report.py::test_simulated[True] - ValueError: Couldn't identify node codelist from ['World', 'chicago', 'new-york', 'san-diego', 'seattle', 'topeka']
FAILED message_ix_models/tests/model/transport/test_report.py::test_simulated_iamc - ValueError: Couldn't identify node codelist from ['World', 'chicago', 'new-york', 'san-diego', 'seattle', 'topeka']
FAILED message_ix_models/tests/model/transport/test_report.py::test_simulated_plot[stock-ldv] - ValueError: Couldn't identify node codelist from ['World', 'chicago', 'new-york', 'san-diego', 'seattle', 'topeka']

I think this indicates that the fixtures for these tests, or some other, unrelated tests, are 'leaking' such that make_dantzig() scenario contents end up in the test scenarios needed for these tests. Will debug.

@khaeru khaeru force-pushed the transport/2025-w15 branch 7 times, most recently from 1ab4807 to 05e42aa Compare May 6, 2025 08:42
khaeru pushed a commit that referenced this pull request May 12, 2025
Update projections such that values are linear extrapolated constant
after the final period, in terms of rations to t=ICE_conv.
khaeru pushed a commit that referenced this pull request May 12, 2025
Experimental changes to SSP3 and SSP4 values.
@khaeru khaeru marked this pull request as ready for review May 13, 2025 09:23
@khaeru khaeru requested a review from r-aneeque as a code owner May 13, 2025 09:23
@khaeru
Copy link
Member Author

khaeru commented May 13, 2025

@r-aneeque if you can leave the ceremonial ✅, that will allow me to merge as soon as I have the tests passing.

@khaeru khaeru force-pushed the transport/2025-w15 branch from ba66d1f to 5eb338c Compare May 13, 2025 10:22
khaeru added a commit that referenced this pull request May 13, 2025
khaeru added a commit that referenced this pull request May 13, 2025
@khaeru khaeru force-pushed the transport/2025-w15 branch from ff54f64 to f8e6cd9 Compare May 13, 2025 11:29
@khaeru khaeru requested a review from glatterf42 as a code owner May 13, 2025 11:29
khaeru added 6 commits May 13, 2025 15:20
Allows to import in other .util submodules.
- Remove outdated remarks related to ixmp 3.5.0, no longer supported.
- Use a regex for the model name resulting from testing.bare_res().
@khaeru khaeru force-pushed the transport/2025-w15 branch from f8e6cd9 to cef8c0e Compare May 13, 2025 13:22
@khaeru khaeru merged commit f908abb into main May 13, 2025
25 checks passed
@khaeru khaeru deleted the transport/2025-w15 branch May 13, 2025 13:52
khaeru added a commit that referenced this pull request May 13, 2025
@khaeru khaeru mentioned this pull request May 13, 2025
6 tasks
khaeru added a commit that referenced this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants