-
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
Refactor to use validation module #771
Refactor to use validation module #771
Conversation
Codecov Report
@@ Coverage Diff @@
## main #771 +/- ##
=====================================
Coverage 94.4% 94.4%
=====================================
Files 61 62 +1
Lines 6121 6130 +9
=====================================
+ Hits 5780 5789 +9
Misses 341 341
|
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. Two small comments below.
import logging | ||
import pandas as pd | ||
|
||
from pyam.utils import make_index, s |
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.
I'd suggest renaming the function s
into something more descriptive.
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.
Any good ideas? The point of that method is to having something short that can be used in a docstring...
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.
Maybe plural_s
? Although I typed that before I'd seen the use in a docstring. There it's quite readable, so ok from my side to keep it this way if we don't have any good ideas.
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.
Good to be merged from my side.
If you find a good alternative name for the s
function you can change it otherwise it's fine as well to keep it as is and merge.
Please confirm that this PR has done the following:
Documentation AddedName of contributors Added to AUTHORS.rstDescription of PR
This PR does three things:
make_index()
to the utils module_exclude_on_fail()
to a new validation modulerequire_data()
implements logical-and, i.e., all combinations across dimensions are required, (see Support logical-and inrequire_data()
#768