Conversation
jbednar
left a comment
There was a problem hiding this comment.
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?