Skip to content

Add ixmp4-backed platform functions#556

Closed
glatterf42 wants to merge 9 commits into
iiasa:enh/ixmp4from
glatterf42:enh/ixmp4-platform-functions
Closed

Add ixmp4-backed platform functions#556
glatterf42 wants to merge 9 commits into
iiasa:enh/ixmp4from
glatterf42:enh/ixmp4-platform-functions

Conversation

@glatterf42

Copy link
Copy Markdown
Member

As suggested in #552 (comment), this PR adds IXMP4Backend functions that are required to pass the test_platform tests. This is separate to keep the PR reviews manageable.

As far as passing the test_platform tests go, this work is incomplete. In some places, I'm not sure best to proceed. For example, test_add_region and test_add_region_synonym are currently failing because the regions-DataFrame returned from the ixmp4 Backend does not include the data the tests currently expect. This is in turn due to the ixmp4 DB model for regions is different from the one in ixmp.
Most notably, ixmp4 requires the hierarchy parameter, but doesn't use parent or synonym. I asked @meksor and @danielhuppmann about this and they said that's on purpose and ixmp doesn't really use these parameters anymore, either. So I think it should be fine to adapt the existing tests, but please let me know what you think, @khaeru.

Similarly, ixmp4 does not seem to store timeslices in a similar way to the JDBC. It looks like I'll have to add this feature first, but I'm not really familiar with the IAMC data storage we currently have implemented.

Another missing feature is the ability to delete stuff in ixmp4. Both optimization data and items as well as Runs as a whole still lack this.

There are several more open questions marked as TODO inline. For example: ixmp4.Run.clone() doesn't support first_model_year and platform_dest. How crucial are these features?

How to review

Required: describe specific things that reviewer(s) must do, in order to ensure that the PR achieves its goal.
If no review is required, write “No review: …” and describe why.

PR checklist

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

@glatterf42 glatterf42 added enh New features & functionality python Pull requests that update Python code labels Jan 28, 2025
@glatterf42 glatterf42 self-assigned this Jan 28, 2025
@glatterf42

Copy link
Copy Markdown
Member Author

Superseded by #557 from within this repo.

@glatterf42 glatterf42 closed this Jan 28, 2025
@glatterf42 glatterf42 deleted the enh/ixmp4-platform-functions branch February 12, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enh New features & functionality python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant