-
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
Implement explicit API for categorize()
#837
Implement explicit API for categorize()
#837
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #837 +/- ##
=====================================
Coverage 95.0% 95.0%
=====================================
Files 64 63 -1
Lines 6134 6134
=====================================
+ Hits 5828 5831 +3
+ Misses 306 303 -3 ☔ View full report in Codecov by Sentry. |
As noted in #819, the feature was implemented as described. I'm indifferent whether this gets merged or the other. |
LGTM, thanks @danielhuppmann also for adding some tests =) |
Learned from the best about being careful of having complete documentation and good test coverage... And I didn't want to be all nitpicky about your PR. |
Please confirm that this PR has done the following:
Name of contributors Added to AUTHORS.rstDescription of PR
This PR implements the explicit signature for
categorize()
and marks the existing signature and the top-level function as deprecated (to be removed for release 3.0) similar to #804 for thevalidate()
method.For explanation: the rationale for the top-level function
pyam.categorize(df)
made sense only because it allowed to apply filters by other dimensions (model, scenario, region, unit) in addition to the criteria based on variable and years. The new signature allows to directly slice-and-validate on any dimension.