-
Notifications
You must be signed in to change notification settings - Fork 9
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 / add component schemas #7
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7 +/- ##
============================================
+ Coverage 88.04% 100.00% +11.95%
============================================
Files 2 6 +4
Lines 92 258 +166
============================================
+ Hits 81 258 +177
+ Misses 11 0 -11
Continue to review full report at Codecov.
|
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 great, very little feedback from me. It'll be nice to play around with it a bit more and get to know how it works.
|
||
def __init__( | ||
self, | ||
data_vars: Dict[Hashable, Union[DataArraySchema, None]] = None, |
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 any of these be abstracted/shared in .typing?
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 think so but I wasn't sure which ones I'd use more than once. I'll take another pass through the type definitions.
Parameters | ||
---------- | ||
name : str, optional | ||
Name of the DataArray. Currently requires an exact string match. |
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 temp until regex matching, but would comparing the .lower or .upper name help?
Parameters | ||
---------- | ||
name : str, optional | ||
Name of the DataArray. Currently requires an exact string match. |
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 temp until regex matching, but would comparing the .lower or .upper name help on string matching?
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.
Opened #9 to discuss
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.
A few questions!
This PR reorganizes the xarray-schema package. A few new features are included (e.g.
to_json
) but it is mostly a refactor that includes: