Skip to content

Add .models.shift_period()#873

Draft
khaeru wants to merge 1 commit into
mainfrom
enh/shift-period
Draft

Add .models.shift_period()#873
khaeru wants to merge 1 commit into
mainfrom
enh/shift-period

Conversation

@khaeru

@khaeru khaeru commented Aug 12, 2024

Copy link
Copy Markdown
Member

This PR adds a function shift_period() that implements, purely in Python, the behaviour of Scenario.clone(…, shift_first_model_year). Because the latter is currently implemented in the Java code underlying ixmp.JDBCBackend, it cannot be extended in parallel with changes to the implementation of MESSAGE in GAMS (or, in the future, other implementations).

More to be added

How to review

To be added

PR checklist

  • Complete the implementation
    • Invoke shift_period() from message_ix.Scenario.clone(…) if the corresponding argument is given.
  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update release notes.

@khaeru khaeru added the enh New features & functionality label Aug 12, 2024
@codecov

codecov Bot commented Aug 12, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.5%. Comparing base (f97e386) to head (b3c35ad).
⚠️ Report is 46 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #873     +/-   ##
=======================================
- Coverage   96.5%   96.5%   -0.1%     
=======================================
  Files         60      60             
  Lines       5155    5179     +24     
=======================================
+ Hits        4976    4999     +23     
- Misses       179     180      +1     
Files with missing lines Coverage Δ
message_ix/message.py 100.0% <100.0%> (ø)
message_ix/tests/test_models.py 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

@khaeru khaeru mentioned this pull request Jan 28, 2025
7 tasks
@khaeru khaeru mentioned this pull request Aug 19, 2025
4 tasks
@glatterf42

Copy link
Copy Markdown
Member

This will address iiasa/ixmp#75.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enh New features & functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants