-
Notifications
You must be signed in to change notification settings - Fork 122
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
Refactor IIASA-connection-API and rework all related tests #413
Refactor IIASA-connection-API and rework all related tests #413
Conversation
Codecov Report
@@ Coverage Diff @@
## master #413 +/- ##
==========================================
+ Coverage 93.26% 93.37% +0.10%
==========================================
Files 35 35
Lines 4129 4149 +20
==========================================
+ Hits 3851 3874 +23
+ Misses 278 275 -3
Continue to review full report at Codecov.
|
@stickler-ci is incorrectly reporting linting errors (they have been fixed) |
@znicholls @byersiiasa @Rlamboll @gidden, FYI - this PR will make the integration with the IIASA-database-API more stable (because of more and more explicit tests), but it also adds one important change: the functions Apologies for the inconvenience, but I didn't find a practical way to avoid the immediate pain on the return type. Please ping any users that you know to be using this feature. |
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.
Found one typo, otherwise my quick glance didn't see anything obviously problematic. Thanks for the heads up @danielhuppmann !!
Co-authored-by: Zeb Nicholls <zebedee.nicholls@climate-energy-college.org>
Please confirm that this PR has done the following:
Description of PR
This PR harmonizes the behavior of the iiasa.Connection class functions, prepares for a refactoring of the IIASA-backend API, and reworks the tests to use a dedicated test database instance (making the tests more precise by comparing full
IamDataFrame
instance rather than just length of returned objects).Changes In detail:
integration-test
instance that has only 4 scenario objects based on the default objects usedconftest.py
, closes Add better documentation and testing of objects returned IIASA-db connection #303read_iiasa()
andquery()
return anIamDataFrame
instead of a pandas object(now including meta-indicators by default), closes Return-type of
iiasa.Connection.query()
not IamDataFrame #378scenario_list()
for an overview of all scenarios in favour ofindex()
available_metadata()
in favour ofmeta_columns
(attribute)metadata()
in favour ofmeta()