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**: 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. diff --git a/doc/maintenance.md b/doc/maintenance.md index 681ec916fd8..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. @@ -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/_show_versions.py b/pygmt/_show_versions.py index 176d77e3f1d..b5b4eb3f003 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 "" ) @@ -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/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/datasets/tile_map.py b/pygmt/datasets/tile_map.py index 419bb48de03..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``. @@ -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/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 3374af11d29..a96ca5b70d0 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." ) ) @@ -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/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 93e45ebc15a..4190cb5f707 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -189,10 +189,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/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..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. @@ -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, 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``. 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):