-
Notifications
You must be signed in to change notification settings - Fork 229
Closed
Labels
feature requestNew feature wantedNew feature wanted
Milestone
Description
Description of the desired feature
As we're supporting multiple GMT versions, sometimes we need to check the current GMT version and see if it has a specific bug or provides a new feature.
To check the GMT version, we need to write codes like:
from packaging.version import Version
from pygmt import clib
with clib.Session() as _lib:
gmt_version = Version(_lib.info["version"])
if gmt_version >= Version("6.4.0"):
...
The same code is being used in many places, so it's better to write a function for it. The function will be like this:
from packaging.version import Version
from pygmt import clib
def get_gmt_version():
with clib.Session() as _lib:
return Version(_lib.info["version"])
Are you willing to help implement and maintain this feature?
Yes, but the details need more discussions.
Metadata
Metadata
Assignees
Labels
feature requestNew feature wantedNew feature wanted