Skip to content

Fix deprecated pygmt maskvalues parameter in grdlandmask call - #18

Merged
lispandfound merged 2 commits into
mainfrom
copilot/fix-deprecation-warnings
Jun 10, 2026
Merged

Fix deprecated pygmt maskvalues parameter in grdlandmask call#18
lispandfound merged 2 commits into
mainfrom
copilot/fix-deprecation-warnings

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

pygmt.grdlandmask deprecated the maskvalues parameter in v0.18.0 (to be removed in v0.20.0) in favour of mask_values.

Changes

  • pygmt_helper/plotting.py: Rename maskvaluesmask_values in the pygmt.grdlandmask call
# Before
land_mask = pygmt.grdlandmask(
    region=...,
    spacing=grid_spacing,
    maskvalues=[0, 1, 1, 1, 1],  # deprecated
    resolution="f",
)

# After
land_mask = pygmt.grdlandmask(
    region=...,
    spacing=grid_spacing,
    mask_values=[0, 1, 1, 1, 1],
    resolution="f",
)

@lispandfound

Copy link
Copy Markdown
Contributor

@copilot the tests are failing.

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the tests are failing.

The CI was using pygmt 0.16.0 (pinned in uv.lock), which predates the mask_values parameter. Fixed in commit Update pygmt to >=0.18.0 and bump requires-python to >=3.12 by:

  • Adding pygmt>=0.18.0 constraint to requirements.txt
  • Updating requires-python to >=3.12 (since pygmt 0.18.0 requires Python 3.12+)
  • Regenerating uv.lock with pygmt 0.18.0

Copilot AI requested a review from lispandfound June 9, 2026 23:28
@lispandfound
lispandfound marked this pull request as ready for review June 10, 2026 01:17
@lispandfound
lispandfound requested a review from claudio525 June 10, 2026 01:17
@lispandfound
lispandfound merged commit 316e6a0 into main Jun 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants