-
Notifications
You must be signed in to change notification settings - Fork 114
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
scenario.clone() returns the default scenario #136
Comments
@behnam2015 can you help adding a test for this case or extending one or more of existing? (see test_integration.py and test_core.py for details) |
cc @danielhuppmann @khaeru FYI |
Thanks. This is pursuant to @behnam2015 explaining to me why I had to do this. May also be related to #112 |
@zikolach, when I only load ixmp things are okey. But when I load a message_ix Scenario this behavoir happens, i.e., |
thanks for identifying this issue @behnam2015. I'm currently reworking the |
Check if clone works as expected
Testing version number after cloning
Cloning without first model year
Cloning after adding first model year
Testing the version number
|
@danielhuppmann, thanks Daniel! I used the test above for this. |
I observe an unexpected behavior when I clone an ixmp Scenario class.
For example, I load a Scenario that has a version number of 42 and clone this via:
scenario.clone()
Then, when I check the version of the cloned scenario (via
scenario.version
), it is 20, while I expect that it would be 43. But when I look at the database scenario list (viamp.scenario_list()
), I see that the cloned scenario has got a version of 43. More importantly, the cloned scenario is not actually cloned from scenario version 42! It is indeed my scenario version 20 loaded. When I look further to the database, I see that this scenario version 20 is the default scenario.So, in short, it seems when I clone scenario version 42, it will be saved as 43 in the database, but
scenario.clone()
method returns my default scenario instead (and not scenario version 43). I hope I'm not missing something out.ixmp.version: 0.1.3.post.dev21
The text was updated successfully, but these errors were encountered: