Skip to content

BREAKING: Raise GMTParameterError exception for missing required parameters. Previously raise GMTInvalidInput - #4374

Merged
seisman merged 30 commits into
GenericMappingTools:mainfrom
Chuan1937:add-gmt-parameter-error
Jan 31, 2026
Merged

BREAKING: Raise GMTParameterError exception for missing required parameters. Previously raise GMTInvalidInput#4374
seisman merged 30 commits into
GenericMappingTools:mainfrom
Chuan1937:add-gmt-parameter-error

Conversation

@Chuan1937

@Chuan1937Chuan1937 commented Jan 28, 2026

Copy link
Copy Markdown
Member

Add GMTParameterError and deprecate GMTInvalidInput.

@seisman
This is the first PR of #4003

Error typesPreferred Parameter NameAlternative Parameter NamesError Message Template
Requiredrequiredmust_have, neededMissing required parameter: '{param}'
Missing required parameters: '{a}', '{b}'
At least one is requiredat_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 one is requiredexactly_onemutually_exclusiveMutually exclusive parameters: '{a}', '{b}', '{c}'. Specify exactly one.
At most oneat_most_onemutually_exclusiveMutually exclusive parameters: '{a}', '{b}', '{c}'. Specify at most one
Conflictingconflicts_withconflicts, incompatible_withConflicting parameters: '{a}' cannot be used with '{b}', '{c}'

Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
@seisman
seisman marked this pull request as draft January 28, 2026 11:06
… input
update source files to support the new feature
@Chuan1937Chuan1937 changed the title Add GMTParameterError and deprecate GMTInvalidInputAdd GMTParameterError and update source filesJan 28, 2026
Comment threaddoc/api/index.rst Outdated
Comment threadpygmt/exceptions.py Outdated
Xingchen Heand others added 2 commits January 29, 2026 12:25
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/exceptions.py Outdated
@seismanseisman added the needs review This PR has higher priority and needs review. label Jan 29, 2026
Comment threadpygmt/helpers/validators.py Outdated
Comment threadpygmt/params/box.py Outdated
Comment threadpygmt/src/text.py Outdated
Xingchen Heand others added 5 commits January 29, 2026 20:58
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>
@seismanseisman added this to the 0.19.0 milestone Jan 29, 2026
@seismanseisman changed the title Add GMTParameterError and update source filesBREAKING: Raise GMTParameterError exception for missing required paramters. Previously raise GMTInvalidInputJan 29, 2026
@seismanseisman changed the title BREAKING: Raise GMTParameterError exception for missing required paramters. Previously raise GMTInvalidInputBREAKING: Raise GMTParameterError exception for missing required parameters. Previously raise GMTInvalidInputJan 29, 2026
@seismanseisman added the enhancement Improving an existing feature label Jan 29, 2026
Comment threadpygmt/src/text.py Outdated
Xingchen Heand others added 5 commits January 30, 2026 09:03
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>
Comment threadpygmt/datasets/load_remote_dataset.py Outdated
Comment threadpygmt/src/grdgradient.py Outdated
Comment threadpygmt/src/inset.py Outdated
Xingchen Heand others added 3 commits January 30, 2026 09:27
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>
@seisman

Copy link
Copy Markdown
Member

Please update failing tests related to the changes.

@seismanseisman added maintenance Boring but important stuff for the core devs and removed enhancement Improving an existing feature labels Jan 30, 2026
@seisman
seisman marked this pull request as ready for review January 30, 2026 02:46
@seismanseisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Jan 30, 2026
@seisman
seisman requested a review from a teamJanuary 30, 2026 02:49
@seisman
seisman merged commit b0f364d into GenericMappingTools:mainJan 31, 2026
27 of 28 checks passed
@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 31, 2026
@Chuan1937
Chuan1937 deleted the add-gmt-parameter-error branch January 31, 2026 12:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenanceBoring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Chuan1937@seisman