-
Notifications
You must be signed in to change notification settings - Fork 1
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
Validation of User Configuration #28
Conversation
This looks promising for capturing user errors, just need some nice formatting:
|
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.
There is one part I am not sure about that @siligam should check.
# FIXME(PS): How is it currently defined? | ||
"model_units": {"type": "string", "required": False}, |
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.
@siligam: This still needs to be added correctly for units.py
. I wasn't sure how you had designed it.
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.
@pgierz "model_units" is referred as "source_units" in units.py. It is a optional parameter. If it is not provided, it reads the model units from xarray dataset. At times, user prefers to use some other unit instead of units from xarray dataset. In this case, "source_units" takes precedence if provided.
The setting "model_units" : {"required": False} is apt.
This adds a collection of validators that can be run against the user supplied dictionaries to check for errors.
Closes #27