-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
xarray parameters #404
base: main
Are you sure you want to change the base?
xarray parameters #404
Conversation
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! I haven't thought deeply about all the things one might want to validate on an Xarray dataset, and I haven't tried actually using it, but it looks like it's doing the right things to me.
Param usually sets
I agree that's confusing, and completely did not remember that param.DataFrame acted that way. It's important to be able to make that distinction, and sets vs. list/dict does concisely convey that, but it's mysterious. It might be nice to have a more explicit way of conveying the same information, but I can't easily think of any non-clunky way to do it. |
Then how about I would argue that A second option would be to introduce explicit boolean flags |
PS: Note that a |
Sounds reasonable to me. |
Just noting that this will need some tests and documentation before being merged. |
Implements #381
I'm just putting this here for discussion. The PR would need some tests I imagine.
Questions:
Should we validate the provided default? Currently, param is e.g. ok with
param.Number(default=None, bounds=(1, 100))
but will throw an error atparam.DataFrame(default=None, rows=(1, 10))
.I've tried to carry over (from DataFrames) the distinction between passing sets or lists into the arguments. This might get confusing though... Opinions?