-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use AllowedValue to constrain indicator arguments to the positive domain #124
Comments
@dbyrns In the climatedata.ca frontend, the fact some parameters could be given negative values even if it makes no sense was flagged as a potential issue. I'm wondering if this is something that should be fixed upstream, either in Finch or even in xclim. Thoughts ? PyWPS has an AllowedValue class that we could use, but ideally the Finch wrapper would take instructions from xclim. |
In Finch, the AllowedValue could indeed specify a range with a minimum value of 0. finch/finch/processes/wps_base.py Line 112 in 5a8beba
|
I cannot set an assignee, but @matprov could look at this. |
See Ouranosinc/xclim#364 (comment) for ideas on how to specify those constraints right from xclim, and then propagate them downstream. Comment and suggestions welcome. |
I'm doing a survey of all those stale issues. Here, the last comments seem to point to xclim's I'm not convinced xclim needs a strict input validator, so we could do that here, but it would need something more complex than filling if kind is NUMBER and name == ''window":
# ensure positive integer
elif kind is QUANTITY and units.diemsionality == "[precipitation]":
# ensure positive
# etc... |
Description
For example, see arguments in
The text was updated successfully, but these errors were encountered: