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

Move Figure.psconvert into a separate file #3553

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Move Figure.psconvert into a separate file #3553

merged 3 commits into from
Oct 27, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Oct 24, 2024

The source code for Figure.psconvert has existed in the pygmt/figure.py file since #31. I think it makes more sense to move it into a separate file pygmt/src/psconvert.py.

@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Oct 24, 2024
@seisman seisman added this to the 0.14.0 milestone Oct 24, 2024
@@ -374,6 +244,9 @@ def savefig( # noqa: PLR0912
raise GMTInvalidInput(msg)
kwargs["W"] = True

# pytest-mpl v0.17.0 added the "metadata" parameter to Figure.savefig, which
Copy link
Member Author

Choose a reason for hiding this comment

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

These lines were initially added to Figure.psconvert in #3054, but I feel it makes more sense to add the lines in Figure.savefig instead.

pygmt/src/psconvert.py Outdated Show resolved Hide resolved
@michaelgrund michaelgrund 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 Oct 25, 2024
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 27, 2024
@seisman seisman merged commit 1e312ee into main Oct 27, 2024
3 of 4 checks passed
@seisman seisman deleted the refactor/psconvert branch October 27, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants