Skip to content

BREAKING: Raise GMTParameterError exception for as_most_one parameters. Previously raise GMTInvalidInput#4383

Merged
seisman merged 14 commits intoGenericMappingTools:mainfrom
Chuan1937:feature/exactly_one_parameter
Feb 4, 2026
Merged

BREAKING: Raise GMTParameterError exception for as_most_one parameters. Previously raise GMTInvalidInput#4383
seisman merged 14 commits intoGenericMappingTools:mainfrom
Chuan1937:feature/exactly_one_parameter

Conversation

@Chuan1937
Copy link
Contributor

@Chuan1937 Chuan1937 commented Feb 3, 2026

Add GMTParameterError: at_most_one

@seisman
This is the third PR of #4003

Error types Preferred Parameter Name Alternative Parameter Names Error Message Template
Required required must_have, needed Missing required parameter: '{param}'
Missing required parameters: '{a}', '{b}'
At least one is required at_least_one need_one_of, , , any_of``one_of``required_any Missing required parameters: '{a}', '{b}', '{c}'. Must specify at least one.
Must specify at least one of the parameters: '{a}', '{b}', '{c}'
Exactly one is required exactly_one mutually_exclusive Mutually exclusive parameters: '{a}', '{b}', '{c}'. Specify exactly one.
At most one at_most_one mutually_exclusive Mutually exclusive parameters: '{a}', '{b}', '{c}'. Specify at most one
Conflicting conflicts_with conflicts, incompatible_with Conflicting parameters: '{a}' cannot be used with '{b}', '{c}'

@Chuan1937 Chuan1937 requested a review from seisman February 3, 2026 04:29
Chuan1937 and others added 2 commits February 3, 2026 12:49
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
Copy link
Member

seisman commented Feb 3, 2026

Please also update subplot.py/makecpt.py/grd2cpt.py

@seisman seisman added the maintenance Boring but important stuff for the core devs label Feb 3, 2026
@seisman seisman added this to the 0.19.0 milestone Feb 3, 2026
Chuan1937 and others added 2 commits February 3, 2026 13:31
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@Chuan1937 Chuan1937 requested a review from seisman February 3, 2026 05:36
@seisman seisman changed the title BREAKING: Raise GMTParameterError exception for exactly_one parameters. Previously raise GMTInvalidInput BREAKING: Raise GMTParameterError exception for as_most_one parameters. Previously raise GMTInvalidInput Feb 3, 2026
Chuan1937 and others added 4 commits February 3, 2026 19:57
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@Chuan1937 Chuan1937 requested a review from seisman February 3, 2026 11:58
@seisman
Copy link
Member

seisman commented Feb 3, 2026

I feel plot.py, plot3d.py, text.py (line 195) should also be updated in this PR.

@Chuan1937 Chuan1937 requested a review from seisman February 4, 2026 01:32
@Chuan1937 Chuan1937 force-pushed the feature/exactly_one_parameter branch from b84afb4 to 1791698 Compare February 4, 2026 02:14
@Chuan1937 Chuan1937 requested a review from seisman February 4, 2026 02:15
@seisman
Copy link
Member

seisman commented Feb 4, 2026

Hmmm, I meant to revert the changes for line 210 in text.py but keep changes in plot.py and plot3d.py.

Chuan1937 and others added 2 commits February 4, 2026 10:50
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman seisman merged commit e9c164a into GenericMappingTools:main Feb 4, 2026
17 of 20 checks passed
@Chuan1937 Chuan1937 deleted the feature/exactly_one_parameter branch February 4, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants