-
Notifications
You must be signed in to change notification settings - Fork 119
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 test-platform
fixture for ixmp4 tests
#832
Add test-platform
fixture for ixmp4 tests
#832
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #832 +/- ##
=======================================
+ Coverage 95.0% 95.1% +0.1%
=======================================
Files 64 63 -1
Lines 6134 6148 +14
=======================================
+ Hits 5828 5849 +21
+ Misses 306 299 -7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in principle.
Just a couple of clarification questions below
logger.warning( | ||
"The `meta.version` column was dropped when writing to the ixmp4 platform." | ||
) | ||
meta = df.meta.drop(columns="version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this result in an empty data frame except for the model and scenario index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, added a test-variant for this case
tests/test_ixmp4.py
Outdated
test_df_year.set_meta(1, "version") # add version number added from ixmp4 | ||
test_df_year.to_ixmp4(platform=test_platform) | ||
|
||
assert "version" not in test_platform.runs.get("model_a", "scen_a").meta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the meta here just yield nothing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta
yields an empty dictionary here, added a test for it
Please confirm that this PR has done the following:
Documentation AddedName of contributors Added to AUTHORS.rstDescription of PR
This PR implements a few improvements related to the tests of the ixmp4-integration:
test_platform
fixture in conftest