-
Notifications
You must be signed in to change notification settings - Fork 235
BREAKING: Raise GMTParameterError exception for at_least_one parameters. Previously raise GMTInvalidInput #4380
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
base: main
Are you sure you want to change the base?
Conversation
modified files for grdclip, grdfill, grdgradient,test_grdclip, test_grdfill, test_grdgradient
|
Also need to update |
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
| "Missing required parameters: " | ||
| f"{', '.join(repr(par) for par in at_least_one)}. " | ||
| "Must specify at least one." | ||
| ) |
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.
So, the error message is like this:
Missing required parameters: 'par1', 'par2', 'par3'. Must specify at least one.
The first sentence reads like all the parameters are required, so it's a little confusing.
What about this one?
Missing parameter: requires at least one of 'par1', 'par2', 'par3'.
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.
Missing parameter: requires at least one of 'par1', 'par2', 'par3'.
It's more concise, I think it's good.
Add GMTParameterError:at_least_one
@seisman
This is the second PR of #4003
requiredmust_have,neededMissing required parameter: '{param}'Missing required parameters: '{a}', '{b}'at_least_oneneed_one_of, , ,any_of``one_of``required_anyMissing required parameters: '{a}', '{b}', '{c}'. Must specify at least one.Must specify at least one of the parameters: '{a}', '{b}', '{c}'exactly_onemutually_exclusiveMutually exclusive parameters: '{a}', '{b}', '{c}'. Specify exactly one.at_most_onemutually_exclusiveMutually exclusive parameters: '{a}', '{b}', '{c}'. Specify at most oneconflicts_withconflicts,incompatible_withConflicting parameters: '{a}' cannot be used with '{b}', '{c}'