Skip to content

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

Merged
seisman merged 2 commits into
mainfrom
config-whitespaces
Jan 26, 2023
Merged

pygmt.config: Correctly resetting to default values that contain whitespaces#2331
seisman merged 2 commits into
mainfrom
config-whitespaces

Conversation

@seisman

Copy link
Copy Markdown
Member

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

@seismanseisman added the bug Something isn't working label Jan 19, 2023
@seismanseisman added this to the 0.9.0 milestone Jan 19, 2023
@seisman
seisman requested a review from weiji14January 19, 2023 07:59
@seismanseisman changed the title pygmt.config: Correctly resettig to default values that contain whitespacespygmt.config: Correctly resetting to default values that contain whitespacesJan 19, 2023
Comment threadpygmt/tests/test_config.py Outdated
@seismanseisman 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
Copy Markdown
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
Copy Markdown
MemberAuthor

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)

@weiji14weiji14 left a comment

Copy link
Copy Markdown
Member

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 🐇🧨

@weiji14weiji14 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
@seismanseisman 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 mainJan 26, 2023
@seisman
seisman deleted the config-whitespaces branch January 26, 2023 00:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething 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

@seisman@michaelgrund@weiji14@willschlitzer