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

Add .models.shift_period() #873

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add .models.shift_period() #873

wants to merge 1 commit into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Aug 12, 2024

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
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.6%. Comparing base (175d64d) to head (fea126e).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #873   +/-   ##
=====================================
  Coverage   95.6%   95.6%           
=====================================
  Files         46      46           
  Lines       4344    4365   +21     
=====================================
+ Hits        4154    4175   +21     
  Misses       190     190           
Files Coverage Δ
message_ix/models.py 99.1% <100.0%> (+<0.1%) ⬆️
message_ix/tests/test_models.py 100.0% <100.0%> (ø)

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.

1 participant