Skip to content

Conversation

@Chuan1937
Copy link
Contributor

@Chuan1937 Chuan1937 commented Jan 12, 2026

Add a note and warning that PS_CONVERT is not supported in PyGMT.

Fixes #4256

Preview: https://pygmt-dev--4342.org.readthedocs.build/en/4342/api/generated/pygmt.config.html#pygmt.config

Copilot AI review requested due to automatic review settings January 12, 2026 03:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for GMT's PS_CONVERT configuration parameter in PyGMT's psconvert function. When users call psconvert explicitly, any PS_CONVERT settings configured in their GMT environment will now be used as default options, matching GMT's behavior.

Changes:

  • Adds logic to read PS_CONVERT configuration via lib.get_default()
  • Parses comma-separated options from PS_CONVERT and injects them as defaults
  • Ensures user-provided arguments take precedence over PS_CONVERT settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Chuan1937
Copy link
Contributor Author

Thanks @seisman for the guidance, I have revised it according to Solution 1.

@seisman
Copy link
Member

seisman commented Jan 13, 2026

@Chuan1937 Please make changes following the discussions in #4256. Let me know if anything is unclear.

@seisman seisman added this to the 0.19.0 milestone Jan 13, 2026
@seisman seisman changed the title fix ps-convert settings Add a note/warning that PS_CONVERT is not supported Jan 13, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs enhancement Improving an existing feature and removed maintenance Boring but important stuff for the core devs labels Jan 13, 2026
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Jan 13, 2026
@seisman
Copy link
Member

seisman commented Jan 13, 2026

Looks good to me. Since it's an enhacenement, not a new feature, I will merge it in 24 hours if no further comments.

@seisman seisman merged commit cb42a3c into GenericMappingTools:main Jan 13, 2026
18 of 20 checks passed
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 13, 2026
@Chuan1937 Chuan1937 deleted the fix-psconvert branch January 14, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PS_CONVERT has no effect when using Figure.show/Figure.savefig/Figure.psconvert

3 participants