-
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
pygmt.show_versions: Warn about incompatible ghostscript versions #3244
Conversation
3142190
to
4ed07fa
Compare
@@ -110,8 +113,18 @@ def show_versions(file=sys.stdout): | |||
import subprocess | |||
|
|||
from packaging.requirements import Requirement | |||
from packaging.version import Version | |||
|
|||
def _get_clib_info() -> dict: |
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.
The pygmt.print_clib_info
function was initially added in #176 but has been replaced by pygmt.show_versions
in #466 (first appear in v0.1.2).
In this PR, a new private function _get_clib_info
is added which returns a dictionary instead of printing a long string.
It's time to retire the print_clib_info
function. Since it's rarely used, I think we can just remove it without a deprecation warning. Of course, we should do it in a separate PR so that at least we have a deprecation entry in the v0.13.0 changelog.
bfeea0c
to
1e4b338
Compare
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Description of proposed changes
_get_clib_info
to return the dictionary of GMT library information_get_ghostscript_version
using match-case statement_check_ghostscript_version
which return warnings if the installed ghostscript version is problematicprint
multiple times.Address #3242