From 7040f6de16b2b9af155a6abd43a53309a6d674b9 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 17:43:49 +0800 Subject: [PATCH 1/7] Remove leading v from pygmt.__version__ --- pygmt/_show_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/_show_versions.py b/pygmt/_show_versions.py index 176d77e3f1d..6a6fd2bfe71 100644 --- a/pygmt/_show_versions.py +++ b/pygmt/_show_versions.py @@ -17,7 +17,7 @@ from pygmt.clib import Session, __gmt_version__, required_gmt_version # Get semantic version through setuptools-scm -__version__ = f"v{version('pygmt')}" # e.g. v0.1.2.dev3+g0ab3cd78 +__version__ = version("pygmt") # e.g., 0.1.2.dev3+g0ab3cd78 __commit__ = ( # 0ab3cd78 __version__.rsplit(sep="+g", maxsplit=1)[-1] if "+g" in __version__ else "" ) From 4ce2b02f37564e65280e25201bb26fd7c771e174 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 17:47:20 +0800 Subject: [PATCH 2/7] Remove leading v in decorator deprecate_parameter --- doc/maintenance.md | 6 +++--- pygmt/helpers/decorators.py | 6 +++--- pygmt/src/grdsample.py | 2 +- pygmt/src/subplot.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/maintenance.md b/doc/maintenance.md index 681ec916fd8..9e2854c62ad 100644 --- a/doc/maintenance.md +++ b/doc/maintenance.md @@ -175,15 +175,15 @@ Here is an example: ```python # TODO(PyGMT>=0.6.0): Remove the deprecated "columns" parameter. @fmt_docstring -@deprecate_parameter("columns", "incols", "v0.4.0", remove_version="v0.6.0") +@deprecate_parameter("columns", "incols", "0.4.0", remove_version="0.6.0") @use_alias(J="projection", R="region", V="verbose", i="incols") @kwargs_to_strings(R="sequence", i="sequence_comma") def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs): pass ``` -In this case, the old parameter name `columns` is deprecated since v0.4.0, and will be -fully removed in v0.6.0. The new parameter name is `incols`. +In this case, the old parameter name `columns` is deprecated since 0.4.0, and will be +fully removed in 0.6.0. The new parameter name is `incols`. ### TODO comments diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 017aeb0710a..765f7644b75 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -792,9 +792,9 @@ def deprecate_parameter(oldname, newname, deprecate_version, remove_version): Examples -------- - >>> @deprecate_parameter("sizes", "size", "v0.0.0", "v9.9.9") - ... @deprecate_parameter("colors", "color", "v0.0.0", "v9.9.9") - ... @deprecate_parameter("infile", "data", "v0.0.0", "v9.9.9") + >>> @deprecate_parameter("sizes", "size", "0.0.0", "9.9.9") + ... @deprecate_parameter("colors", "color", "0.0.0", "9.9.9") + ... @deprecate_parameter("infile", "data", "0.0.0", "9.9.9") ... def module(data, size=0, **kwargs): ... "A module that prints the arguments it received" ... print(f"data={data}, size={size}, color={kwargs['color']}") diff --git a/pygmt/src/grdsample.py b/pygmt/src/grdsample.py index 8cc3cda9465..925752700a6 100644 --- a/pygmt/src/grdsample.py +++ b/pygmt/src/grdsample.py @@ -22,7 +22,7 @@ # TODO(PyGMT>=0.21.0): Remove the deprecated "translate" parameter. @fmt_docstring -@deprecate_parameter("translate", "toggle", "v0.18.0", remove_version="v0.21.0") +@deprecate_parameter("translate", "toggle", "0.18.0", remove_version="0.21.0") @use_alias(f="coltypes", n="interpolation") def grdsample( grid: PathLike | xr.DataArray, diff --git a/pygmt/src/subplot.py b/pygmt/src/subplot.py index 4f511c93fe6..33de62ceebf 100644 --- a/pygmt/src/subplot.py +++ b/pygmt/src/subplot.py @@ -359,7 +359,7 @@ def subplot( @fmt_docstring @contextlib.contextmanager # TODO(PyGMT>=0.23.0): Remove the deprecated 'fixedlabel' parameter. -@deprecate_parameter("fixedlabel", "tag", "v0.19.0", remove_version="v0.23.0") +@deprecate_parameter("fixedlabel", "tag", "0.19.0", remove_version="0.23.0") @use_alias(C="clearance") def set_panel( self, From 03e8bc8393712d1a8fdd28482dbbc94d9c42b793 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 17:50:48 +0800 Subject: [PATCH 3/7] Remove leading v from deprecation messages and comments --- pygmt/clib/session.py | 4 ++-- pygmt/figure.py | 2 +- pygmt/helpers/decorators.py | 12 ++++++------ pygmt/src/basemap.py | 14 +++++++------- pygmt/src/coast.py | 6 +++--- pygmt/src/subplot.py | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pygmt/clib/session.py b/pygmt/clib/session.py index dda4b03ae5c..bdf61996e07 100644 --- a/pygmt/clib/session.py +++ b/pygmt/clib/session.py @@ -645,14 +645,14 @@ def call_module(self, module: str, args: str | list[str]) -> None: # 'args' is a list of strings and each string contains a module argument. # In this way, GMT can correctly handle option arguments with whitespaces or # quotation marks. This is the preferred way to pass arguments to the GMT - # API and is used for PyGMT >= v0.12.0. + # API and is used for PyGMT>=0.12.0. mode = len(args) # 'mode' is the number of arguments. # Pass a null pointer if no arguments are specified. argv = strings_to_ctypes_array(args) if mode != 0 else None elif isinstance(args, str): # 'args' is a single string that contains whitespace-separated arguments. # In this way, we need to correctly handle option arguments that contain - # whitespaces or quotation marks. It's used in PyGMT <= v0.11.0 but is no + # whitespaces or quotation marks. It's used in PyGMT<=0.11.0 but is no # longer recommended. mode = self["GMT_MODULE_CMD"] argv = args.encode() diff --git a/pygmt/figure.py b/pygmt/figure.py index bdcb030291c..34c345bb707 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -284,7 +284,7 @@ def savefig( ) kwargs["W"] = True - # pytest-mpl v0.17.0 added the "metadata" parameter to Figure.savefig, which is + # pytest-mpl 0.17.0 added the "metadata" parameter to Figure.savefig, which is # not recognized. So remove it before calling Figure.psconvert. kwargs.pop("metadata", None) self.psconvert(prefix=prefix, fmt=fmts[ext], crop=crop, **kwargs) diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 765f7644b75..1dc89225411 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -570,29 +570,29 @@ def new_module(*args, **kwargs): ) warnings.warn(msg, category=SyntaxWarning, stacklevel=2) - # timestamp (U) is deprecated since v0.9.0 and removed in v0.12.0. + # timestamp (U) is deprecated since 0.9.0 and removed in 0.12.0. if "U" in kwargs or "timestamp" in kwargs: raise GMTParameterError( reason=( - "Parameters 'U' and 'timestamp' are no longer supported since v0.12.0. " + "Parameters 'U' and 'timestamp' are no longer supported since 0.12.0. " "Use Figure.timestamp() instead." ) ) - # xshift (X) is deprecated since v0.8.0 and removed in v0.12.0. + # xshift (X) is deprecated since 0.8.0 and removed in 0.12.0. if "X" in kwargs or "xshift" in kwargs: raise GMTParameterError( reason=( - "Parameters 'X' and 'xshift' are no longer supported since v0.12.0. " + "Parameters 'X' and 'xshift' are no longer supported since 0.12.0. " "Use Figure.shift_origin(xshift=...) instead." ) ) - # yshift (Y) is deprecated since v0.8.0 and removed in v0.12.0. + # yshift (Y) is deprecated since 0.8.0 and removed in 0.12.0. if "Y" in kwargs or "yshift" in kwargs: raise GMTParameterError( reason=( - "Parameters 'Y' and 'yshift' are no longer supported since v0.12.0. " + "Parameters 'Y' and 'yshift' are no longer supported since 0.12.0. " "Use Figure.shift_origin(yshift=...) instead." ) ) diff --git a/pygmt/src/basemap.py b/pygmt/src/basemap.py index c209cf016b1..8555192d2f6 100644 --- a/pygmt/src/basemap.py +++ b/pygmt/src/basemap.py @@ -44,8 +44,8 @@ def basemap( .. note:: - Parameters ``map_scale``, ``rose``, and ``compass`` are deprecated since - v0.19.0 in favor of the dedicated higher-level methods: + Parameters ``map_scale``, ``rose``, and ``compass`` are deprecated since 0.19.0 + in favor of the dedicated higher-level methods: - :meth:`pygmt.Figure.scalebar`: Add a scale bar on the plot. - :meth:`pygmt.Figure.directional_rose`: Add a directional rose on the plot. @@ -85,7 +85,7 @@ def basemap( map_scale Draw a map scale bar on the plot. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 Use :meth:`pygmt.Figure.scalebar` instead. This parameter is maintained for backward compatibility and accepts raw GMT CLI strings for the ``-L`` @@ -93,7 +93,7 @@ def basemap( compass Draw a map magnetic rose on the map. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 Use :meth:`pygmt.Figure.magnetic_rose` instead. This parameter is maintained for backward compatibility and accepts raw GMT CLI strings for the ``-Tm`` @@ -101,7 +101,7 @@ def basemap( rose Draw a map directional rose on the map. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 Use :meth:`pygmt.Figure.directional_rose` instead. This parameter is maintained for backward compatibility and accepts raw GMT CLI strings for @@ -109,7 +109,7 @@ def basemap( box Draw a background box behind the scalebar, directional rose, or magnetic rose. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 Use the ``box`` parameter in :meth:`pygmt.Figure.scalebar`, :meth:`pygmt.Figure.directional_rose`, or :meth:`pygmt.Figure.magnetic_rose` @@ -147,7 +147,7 @@ def basemap( ): if is_given(value): warnings.warn( - f"The {name!r} parameter has been deprecated since v0.19.0. Use {recommendation!r} instead.", + f"The {name!r} parameter has been deprecated since 0.19.0. Use {recommendation!r} instead.", category=FutureWarning, stacklevel=2, ) diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index cd6123a1665..9b62d76963e 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -187,10 +187,10 @@ def coast( map_scale Draw a map scale bar on the plot. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 - Use :meth:`pygmt.Figure.scalebar` instead. This parameter is maintained - for backward compatibility and accepts raw GMT CLI strings for the ``-L`` + Use :meth:`pygmt.Figure.scalebar` instead. This parameter is maintained for + backward compatibility and accepts raw GMT CLI strings for the ``-L`` option. box Draw a background box behind the map scale or rose. If set to ``True``, a simple diff --git a/pygmt/src/subplot.py b/pygmt/src/subplot.py index 33de62ceebf..58782de6516 100644 --- a/pygmt/src/subplot.py +++ b/pygmt/src/subplot.py @@ -231,7 +231,7 @@ def subplot( autolabel Specify automatic tag of each subplot. - .. deprecated:: v0.19.0 + .. deprecated:: 0.19.0 Use the parameters ``tag``, ``tag_position``, ``tag_box``, ``tag_number_style``, ``tag_orientation``, and ``tag_font`` instead. From 010f7e54d4eeb70b9eff7117d7a60d6f5040c641 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 17:57:06 +0800 Subject: [PATCH 4/7] Fix remaining cases --- doc/maintenance.md | 6 +++--- pygmt/_show_versions.py | 10 +++++----- pygmt/datasets/tile_map.py | 2 +- pygmt/tests/test_timestamp.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/maintenance.md b/doc/maintenance.md index 9e2854c62ad..9280e43e12b 100644 --- a/doc/maintenance.md +++ b/doc/maintenance.md @@ -146,9 +146,9 @@ patch release. ## Backwards Compatibility and Deprecation Policy PyGMT is still undergoing rapid development. All of the API is subject to change until -the v1.0.0 release. Versioning in PyGMT is based on the -[semantic versioning specification](https://semver.org/spec/v2.0.0.html) -(i.e., v*MAJOR*.*MINOR*.*PATCH*). Basic policy for backwards compatibility: +the 1.0.0 release. Versioning in PyGMT is based on the +[semantic versioning specification](https://semver.org/spec/v2.0.0.html) (i.e., +*MAJOR*.*MINOR*.*PATCH*). Basic policy for backwards compatibility: - Any incompatible changes should go through the deprecation process below. - Incompatible changes are only allowed in major and minor releases, not in patch releases. diff --git a/pygmt/_show_versions.py b/pygmt/_show_versions.py index 6a6fd2bfe71..b5b4eb3f003 100644 --- a/pygmt/_show_versions.py +++ b/pygmt/_show_versions.py @@ -93,19 +93,19 @@ def _check_ghostscript_version(gs_version: str | None) -> str | None: match Version(gs_version): case v if v < Version("9.53"): return ( - f"Ghostscript v{gs_version} is too old and may have serious bugs. " + f"Ghostscript {gs_version} is too old and may have serious bugs. " "Please consider upgrading your Ghostscript." ) case v if Version("10.00") <= v < Version("10.02"): return ( - f"Ghostscript v{gs_version} has known bugs. " - "Please consider upgrading to version v10.02 or later." + f"Ghostscript {gs_version} has known bugs. " + "Please consider upgrading to Ghostscript 10.02 or later." ) case v if v >= Version("10.02") and Version(__gmt_version__) < Version("6.5.0"): return ( - f"GMT v{__gmt_version__} doesn't support Ghostscript v{gs_version}. " + f"GMT {__gmt_version__} doesn't support Ghostscript {gs_version}. " "Please consider upgrading to GMT>=6.5.0 or downgrading to Ghostscript " - "v9.56." + "9.56." ) return None diff --git a/pygmt/datasets/tile_map.py b/pygmt/datasets/tile_map.py index 419bb48de03..64e082ce281 100644 --- a/pygmt/datasets/tile_map.py +++ b/pygmt/datasets/tile_map.py @@ -178,7 +178,7 @@ def load_tile_map( } # TODO(contextily>=1.7.0): Remove once contextily>=1.7.0 is required. - # The 'headers' parameter was added in contextily v1.7.0 + # The 'headers' parameter was added in contextily 1.7.0. if Version(contextily.__version__) < Version("1.7.0"): if headers is not None: raise GMTParameterError( diff --git a/pygmt/tests/test_timestamp.py b/pygmt/tests/test_timestamp.py index f6fdff6f296..3c596cfa900 100644 --- a/pygmt/tests/test_timestamp.py +++ b/pygmt/tests/test_timestamp.py @@ -102,7 +102,7 @@ def test_timestamp_unsupported_u_timestamp(): """ Raise an exception when either U or timestamp is used. - Parameters U and timestamp are no longer supported since v0.12.0. + Parameters U and timestamp are no longer supported since 0.12.0. """ fig = Figure() with pytest.raises(GMTParameterError): From a98db0cd347b37d7f883862dd97401b948a5c604 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 18:23:11 +0800 Subject: [PATCH 5/7] Add a note in release checklist --- .github/ISSUE_TEMPLATE/4-release_checklist.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/4-release_checklist.md b/.github/ISSUE_TEMPLATE/4-release_checklist.md index a0163ba284a..03711b570cc 100644 --- a/.github/ISSUE_TEMPLATE/4-release_checklist.md +++ b/.github/ISSUE_TEMPLATE/4-release_checklist.md @@ -40,15 +40,16 @@ assignees: '' - [ ] At the [PyGMT release page on GitHub](https://github.com/GenericMappingTools/pygmt/releases): - [ ] Edit the draft release notes with the finalized changelog - - [ ] Set the tag version and release title to vX.Y.Z + - [ ] Set the tag version and release title to `vX.Y.Z` - [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too - [ ] Verify that [all workflows triggered by the release](https://github.com/GenericMappingTools/pygmt/actions?query=event%3Arelease) pass - [ ] The latest version is correct on [PyPI](https://pypi.org/project/pygmt/) - [ ] The latest version is correct on https://www.pygmt.org/latest/ - [ ] The [release page](https://github.com/GenericMappingTools/pygmt/releases) has five assets, including `baseline-images.zip`, `pygmt-docs.zip` and `pygmt-docs.pdf` - [ ] Upload to Zenodo: - - [ ] Download pygmt-X.Y.Z.zip (listed as Source code (zip); rename it to pygmt-vX.Y.Z.zip) and baseline-images.zip from the release page, and upload the two zip files to https://zenodo.org/deposit + - [ ] Download pygmt-X.Y.Z.zip (listed as Source code (zip)) and baseline-images.zip from the release page, and upload the two zip files to https://zenodo.org/deposit - [ ] Ensure they are filed under the correct reserved DOI + - [ ] Ensure the `version` field is `X.Y.Z` (without leading `v`) - [ ] Update authorship information based on `CITATION.cff` **After release**: From 02dd66b813e26eca51a090117372226b88363678 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 19:20:11 +0800 Subject: [PATCH 6/7] Fix the version string in User-Agent passed to contextily --- pygmt/datasets/tile_map.py | 2 +- pygmt/src/tilemap.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/datasets/tile_map.py b/pygmt/datasets/tile_map.py index 64e082ce281..a07fd63e233 100644 --- a/pygmt/datasets/tile_map.py +++ b/pygmt/datasets/tile_map.py @@ -107,7 +107,7 @@ def load_tile_map( HTTP headers to include with requests to the tile server. This can be useful for authentication or to set a custom User-Agent. When supported by ``contextily`` (>=1.7.0), PyGMT sets a default ``User-Agent`` header like - ``PyGMT/vX.Y.Z (+https://www.pygmt.org)``. + ``PyGMT/X.Y.Z (+https://www.pygmt.org)``. .. note:: Requires ``contextily>=1.7.0``. diff --git a/pygmt/src/tilemap.py b/pygmt/src/tilemap.py index 706dd607bb6..c01ab26ac54 100644 --- a/pygmt/src/tilemap.py +++ b/pygmt/src/tilemap.py @@ -113,7 +113,7 @@ def tilemap( HTTP headers to include with requests to the tile server. This can be useful for authentication or to set a custom User-Agent. When supported by ``contextily`` (>=1.7.0), PyGMT sets a default ``User-Agent`` header like - ``PyGMT/vX.Y.Z (+https://www.pygmt.org)``. + ``PyGMT/X.Y.Z (+https://www.pygmt.org)``. .. note:: Requires ``contextily>=1.7.0``. From 8cf07e415ff3aa06dfa36cb4e85f83e9a868b5b4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 14 Aug 2026 19:22:40 +0800 Subject: [PATCH 7/7] Manually add the leading v for tags in doc/conf.py --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 47b3130c3a6..d476ea83281 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,7 +20,7 @@ commit_link = f'{__commit__[:8]}' else: commit_link = ( - f'{__version__}' + f'v{__version__}' ) # Projection information.