-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Can improve default param setting once GenericMappingTools/pygmt#411 is merged
Functionality-wise, this bugfix PR is done. We could add the tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
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
*_PRIMARY
and*_SECONDARY
parameters for 7 of them (excludingFONT
) in an allowlist.Fixes #409
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.