Skip to content

BREAKING: Raise GMTParameterError exception for conflicts_with parameters. Previously raise GMTInvalidInput - #4387

Merged
seisman merged 46 commits into
GenericMappingTools:mainfrom
Chuan1937:feature/conflict
Feb 6, 2026
Merged

BREAKING: Raise GMTParameterError exception for conflicts_with parameters. Previously raise GMTInvalidInput#4387
seisman merged 46 commits into
GenericMappingTools:mainfrom
Chuan1937:feature/conflict

Conversation

@Chuan1937

@Chuan1937Chuan1937 commented Feb 4, 2026

Copy link
Copy Markdown
Member

Add GMTParameterError: conflicts_with

@seisman
This is the fourth 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}'
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/src/_common.py Outdated
Comment threadpygmt/src/_common.py Outdated
Comment threadpygmt/src/grdview.py Outdated
Xingchen Heand others added 4 commits February 4, 2026 17:21
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/src/grdview.py Outdated
Comment threadpygmt/src/_common.py Outdated
Comment threadpygmt/src/_common.py Outdated
Xingchen Heand others added 3 commits February 4, 2026 17:36
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 maintenance Boring but important stuff for the core devs final review call This PR requires final review and approval from a second reviewer labels Feb 4, 2026
@seismanseisman added this to the 0.19.0 milestone Feb 4, 2026
@seisman
seisman self-requested a review February 4, 2026 09:43
@seisman

Copy link
Copy Markdown
Member

Please also update pygmt/alias.py.

@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Feb 4, 2026
Comment threadpygmt/alias.py Outdated
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/alias.py
Comment threadpygmt/alias.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/alias.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/alias.py
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/tests/test_alias_system.py
Comment threadpygmt/tests/test_alias_system.py Outdated
Comment threadpygmt/alias.py
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman

Copy link
Copy Markdown
Member

This PR is almost in good shape. The failing tests are actually because set in Python is not order-guaranteed, so using set is likely a bad idea.

Comment threadpygmt/alias.py Outdated
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/src/_common.py Outdated
Comment threadpygmt/src/grdview.py Outdated
Xingchen Heand others added 6 commits February 6, 2026 16: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>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@Chuan1937

Copy link
Copy Markdown
MemberAuthor

This PR is almost in good shape. The failing tests are actually because set in Python is not order-guaranteed, so using set is likely a bad idea.

Indeed, I have been making corrections along the wrong path. Thank you for your corrections.

Comment threadpygmt/exceptions.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Comment threadpygmt/exceptions.py Outdated
Comment threadpygmt/exceptions.py Outdated
Xingchen Heand others added 2 commits February 6, 2026 16:41
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
seisman merged commit c5743fd into GenericMappingTools:mainFeb 6, 2026
15 of 20 checks passed
@Chuan1937
Chuan1937 deleted the feature/conflict branch February 6, 2026 08:53
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