Skip to content

pygmt.grdsample: Add check and test for exclusive parameters 'toggle' and 'registration'#4183

Merged
seisman merged 21 commits intoGenericMappingTools:mainfrom
Chuan1937:grdsample-check
Nov 8, 2025
Merged

pygmt.grdsample: Add check and test for exclusive parameters 'toggle' and 'registration'#4183
seisman merged 21 commits intoGenericMappingTools:mainfrom
Chuan1937:grdsample-check

Conversation

@Chuan1937
Copy link
Member

@Chuan1937 Chuan1937 commented Nov 1, 2025

Description of proposed changes

  • Enforce mutual exclusivity between translate (-T) and registration (-r) in pygmt.grdsample; raise GMTInvalidInput when both are provided.
  • Add a unit test to verify the error is raised for the conflicting parameters.

Related to #3337

Preview: N/A

@Chuan1937
Copy link
Member Author

@seisman

@seisman seisman changed the title Add Parameter Mutex Check + test pygmt.grdsample: Add check and test for exclusive parameters 'translate' and 'registration' Nov 1, 2025
@seisman
Copy link
Member

seisman commented Nov 1, 2025

Could you please run make format locally to automatically format the code so that it follows our standards?

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Nov 1, 2025
@seisman seisman added this to the 0.18.0 milestone Nov 1, 2025
@Chuan1937
Copy link
Member Author

Could you please run make format locally to automatically format the code so that it follows our standards?

Fixed

@seisman
Copy link
Member

seisman commented Nov 2, 2025

Let's wait for PRs #4185, #4184, and #4182 first.

@seisman
Copy link
Member

seisman commented Nov 4, 2025

Let's wait for PRs #4185, #4184, and #4182 first.

@Chuan1937 PRs #4184 and #4185 have been merged into the main branch. Could you please update your PR and resolve the conflicts?

Chuan1937 and others added 4 commits November 4, 2025 13:29
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>
Remove note about mutual exclusivity of translate and registration.
Chuan1937 and others added 2 commits November 7, 2025 20:10
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Chuan1937 and others added 3 commits November 7, 2025 20:33
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 seisman added the final review call This PR requires final review and approval from a second reviewer label Nov 7, 2025
@Chuan1937
Copy link
Member Author

The local test failed before, but it works now.

@Chuan1937 Chuan1937 requested a review from seisman November 7, 2025 13:19
Chuan1937 and others added 3 commits November 7, 2025 22:22
@seisman seisman changed the title pygmt.grdsample: Add check and test for exclusive parameters 'translate' and 'registration' pygmt.grdsample: Add check and test for exclusive parameters 'toggle' and 'registration' Nov 8, 2025
@seisman seisman merged commit 5ce1971 into GenericMappingTools:main Nov 8, 2025
19 of 20 checks passed
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Nov 8, 2025
@seisman
Copy link
Member

seisman commented Nov 8, 2025

@Chuan1937 Thank you for contributing to the PyGMT project. Feel free to open a new pull request to add yourself to the AUTHORS.md file.

@Chuan1937 Chuan1937 deleted the grdsample-check branch November 8, 2025 09:10
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 skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants