-
Notifications
You must be signed in to change notification settings - Fork 120
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
Switch IIASA-Connection default
argument
#733
Switch IIASA-Connection default
argument
#733
Conversation
Codecov Report
@@ Coverage Diff @@
## main #733 +/- ##
=====================================
Coverage 95.1% 95.1%
=====================================
Files 59 59
Lines 6044 6057 +13
=====================================
+ Hits 5748 5761 +13
Misses 296 296
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
IXMPs python API will provide a Platform.runs.tabulate
function which takes default_only
and is_default
arguments.
default_only
is True per default, so Platform.runs.tabulate(is_default=False)
will always return nothing. Instead Platform.runs.tabulate(is_default=False, default_only=False)
will return all non-default runs.
It might be worth keeping this in mind when designing the pyam API.
800f763
to
176ba62
Compare
Thanks for the clarification, @meksor, will update the PR |
176ba62
to
28ce008
Compare
After some thinking, I went back to simply renaming the kwarg from "default" to "default_only" for forward-compatibility (with a deprecation-warning until release 2.0). The "is_default"-option (True, False, None) will not be available in the current (soon-to-be-legacy) API, so it's not necessary to add that here. |
Please confirm that this PR has done the following:
Tests AddedName of contributors Added to AUTHORS.rstDescription of PR
In anticipation of the release of the re-implemented ixmp package, this PR changes the API of the iiasa.Connection methods to resemble other filter options (and the forthcoming ixmp API).
Currently, a user could be confused that the query
will return a table of runs that have both True and False in the
is_default
column.Going forward, a user has to do
is_default=None
to get all scenarios (default and non-default), whileis_default=True
will return only the default scenarios (as currently implemented bydefault=True
).The new ixmp package will also support
is_default=False
to return only the non-default scenarios - the current ixmp API does not support that option.