Handle setting special parameters without default settings for config#411
Merged
Handle setting special parameters without default settings for config#411
Conversation
There are 7 parameters in gmt.conf that don't have default settings, meaning they can't be reverted back easily when using `pygmt.config`. This can be addressed for 6 of them in a whitelist (FONT_ANNOT, FORMAT_TIME_MAP, MAP_ANNOT_OFFSET, MAP_GRID_CROSS_SIZE, MAP_TICK_LENGTH, MAP_TICK_PEN) by manually setting the relevant `*_PRIMARY` and `*_SECONDARY` parameters. Tests added to check that those special parameters are indeed set and reverted back properly when using `pygmt.config` in a `with` statement.
Test number one to check that `FONT_ANNOT_PRIMARY`, `FONT_ANNOT_SECONDARY`, `FONT_LABEL`, and `FONT_TITLE` are modified when the `FONT` config is set.
Member
Author
liamtoney
added a commit
to uafgeotools/rtm
that referenced
this pull request
Apr 27, 2020
Can improve default param setting once GenericMappingTools/pygmt#411 is merged
seisman
reviewed
May 12, 2020
Member
Author
Functionality-wise, this bugfix PR is done. We could add the tests for |
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.
Description of proposed changes
There are 8 parameters in gmt.conf that don't have default settings, meaning they can't be reverted back easily when using
pygmt.config. They are:We can manually set the relevant
*_PRIMARYand*_SECONDARYparameters for 7 of them (excludingFONT) in an allowlist.Fixes #409
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.