Skip to content
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

pygmt.config: Correctly resetting to default values that contain whitespaces #2331

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 19, 2023

Description of proposed changes

Fixes #2298

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@seisman seisman added the bug Something isn't working label Jan 19, 2023
@seisman seisman added this to the 0.9.0 milestone Jan 19, 2023
@seisman seisman requested a review from weiji14 January 19, 2023 07:59
@seisman seisman changed the title pygmt.config: Correctly resettig to default values that contain whitespaces pygmt.config: Correctly resetting to default values that contain whitespaces Jan 19, 2023
pygmt/tests/test_config.py Outdated Show resolved Hide resolved
@seisman seisman added the needs review This PR has higher priority and needs review. label Jan 19, 2023
Comment on lines +80 to +81
# Set FORMAT_DATE_MAP to "yyyy mm dd" which contains whitespaces.
config(FORMAT_DATE_MAP="yyyy mm dd")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a test being added to use this whitespace-containing FORMAT_DATE_MAP or is this sufficient to be used on other tests to make sure that whitespace can work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this sufficient to be used on other tests to make sure that whitespace can work?

Yes, please see #2298 (comment)

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @seisman, good catch on finding the whitespace issue during the pygmt.config reset, should have caught this earlier in #1487.

Oh, and Happy Chinese New Year 🐇🧨

@weiji14 weiji14 added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Jan 24, 2023
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 26, 2023
@seisman seisman merged commit ae4aadb into main Jan 26, 2023
@seisman seisman deleted the config-whitespaces branch January 26, 2023 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pygmt.config doesn't work with values that have whitespaces
4 participants