Migrate the parameter 'verbose' to the new alias system and let it support descriptive arguments#4039
Merged
Migrate the parameter 'verbose' to the new alias system and let it support descriptive arguments#4039
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the verbose parameter to the new alias system and introduces the .add_common() method to the AliasSystem class to reduce code duplication when handling common parameters across GMT wrappers.
- Adds the
.add_common()method toAliasSystemfor centralized management of common parameters likeverbose - Updates
basemapfunction to use the new alias system for theverboseparameter with type hints and descriptive string arguments - Updates documentation to reflect the change from single-letter codes to descriptive argument names
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pygmt/src/basemap.py | Migrates verbose parameter to use new alias system with descriptive arguments and type hints |
| pygmt/alias.py | Adds add_common method to AliasSystem class and updates docstring examples |
| doc/techref/common_parameters.md | Updates documentation to use descriptive verbose argument names instead of single letters |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
michaelgrund
approved these changes
Aug 8, 2025
f74ff96 to
cccf373
Compare
Member
Author
|
@GenericMappingTools/pygmt-maintainers Please give this PR a final review. I plan to merge it in 48 hours. |
weiji14
approved these changes
Aug 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates the
verboseparameter to the new alias system and let it support descriptive arguments. The long names come from https://github.com/GenericMappingTools/gmt/blob/dd32dd35573e0c54b5b5eb5616f039ab9f6d3614/src/gmt_common_longoptions.h#L91.