From ae8803812f22386d28374cecf1101b00d1723355 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 3 Sep 2025 22:20:03 +0800 Subject: [PATCH 1/7] Figure.logo: Let the 'style' parameter support descriptive arguments --- pygmt/src/logo.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index f81b189bf61..54665e84b88 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -4,22 +4,18 @@ from typing import Literal -from pygmt.alias import AliasSystem +from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias @fmt_docstring -@use_alias( - R="region", - D="position", - F="box", - S="style", -) +@use_alias(R="region", D="position", F="box") @kwargs_to_strings(R="sequence", p="sequence") def logo( self, projection=None, + style: Literal["standard", "url", "no_label"] = "standard", verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | tuple[int, int] | bool = False, @@ -38,6 +34,7 @@ def logo( {aliases} - J = projection + - S = style - V = verbose - c = panel - t = transparency @@ -53,21 +50,23 @@ def logo( box : bool or str If set to ``True``, draw a rectangular border around the GMT logo. - style : str - [**l**\|\ **n**\|\ **u**]. + style Control what is written beneath the map portion of the logo. - - **l** to plot the text label "The Generic Mapping Tools" - [Default] - - **n** to skip the label placement - - **u** to place the URL to the GMT site + - `"standard"`: The text label "The Generic Mapping Tools". + - `"url"`: The URL to the GMT site. + - `"no_label"`: Skip the text label {verbose} {panel} {transparency} """ self._activate_figure() - aliasdict = AliasSystem().add_common( + aliasdict = AliasSystem( + S=Alias( + style, name="style", mapping={"standard": "l", "url": "u", "no_label": "n"} + ), + ).add_common( J=projection, V=verbose, c=panel, From 55399cb0282693d6225970e4543fc25152fe9849 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 3 Sep 2025 22:32:39 +0800 Subject: [PATCH 2/7] Update pygmt/src/logo.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pygmt/src/logo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index 54665e84b88..be1e237ef42 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -53,9 +53,7 @@ def logo( style Control what is written beneath the map portion of the logo. - - `"standard"`: The text label "The Generic Mapping Tools". - - `"url"`: The URL to the GMT site. - - `"no_label"`: Skip the text label + - `"no_label"`: Skip the text label. {verbose} {panel} {transparency} From f1a573acb2c98e95be76d8ca27429d1c686ca4fd Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 3 Sep 2025 22:34:17 +0800 Subject: [PATCH 3/7] Fix docstrings --- pygmt/src/logo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index be1e237ef42..f89d4aad86c 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -53,7 +53,9 @@ def logo( style Control what is written beneath the map portion of the logo. - - `"no_label"`: Skip the text label. + - ``"standard"``: The text label "The Generic Mapping Tools". + - ``"url"``: The URL to the GMT site. + - ``"no_label"``: Skip the text label. {verbose} {panel} {transparency} From 5f981c5cef4533a9cfa6b5c5a26837cf3314a7aa Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 4 Sep 2025 18:29:41 +0800 Subject: [PATCH 4/7] Fix site to website MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/src/logo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index f89d4aad86c..c55f10249d5 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -54,7 +54,7 @@ def logo( Control what is written beneath the map portion of the logo. - ``"standard"``: The text label "The Generic Mapping Tools". - - ``"url"``: The URL to the GMT site. + - ``"url"``: The URL to the GMT website. - ``"no_label"``: Skip the text label. {verbose} {panel} From 1741d0af3b8d44e89f04eb98dd43a7347e0f13d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 20:39:12 +0800 Subject: [PATCH 5/7] Build(deps): Bump codecov/codecov-action from 5.4.3 to 5.5.0 (#4076) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.3 to 5.5.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/18283e04ce6e62d37312384ff67231eb8fd56d24...fdcc8476540edceab3de004e990f80d881c6cc00) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 4924bad9e71..f461277121f 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -183,7 +183,7 @@ jobs: # Upload coverage to Codecov - name: Upload coverage to Codecov - uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 + uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0 if: success() || failure() with: use_oidc: true From 2ea461ebc57b85fa1d832e11a72a0f8c8639bef4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 15 Sep 2025 17:53:58 +0800 Subject: [PATCH 6/7] Improve docstring for style --- pygmt/src/logo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index 22692a4f129..682fe1ff74a 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -55,8 +55,7 @@ def logo( box is drawn using :gmt-term:`MAP_FRAME_PEN`. To customize the box appearance, pass a :class:`pygmt.params.Box` object to control style, fill, pen, and other box properties. - style : str - [**l**\|\ **n**\|\ **u**]. + style Control what is written beneath the map portion of the logo. - ``"standard"``: The text label "The Generic Mapping Tools". From f28757acdde4e3850688a8a40bf62c965348ea5a Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 18 Sep 2025 19:35:49 +0800 Subject: [PATCH 7/7] Update pygmt/src/logo.py Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- pygmt/src/logo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index 682fe1ff74a..d6bbdff2d09 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -59,8 +59,8 @@ def logo( Control what is written beneath the map portion of the logo. - ``"standard"``: The text label "The Generic Mapping Tools". - - ``"url"``: The URL to the GMT website. - ``"no_label"``: Skip the text label. + - ``"url"``: The URL to the GMT website. {verbose} {panel} {transparency}