Skip to content

Fix missing and misnamed parameters in docstrings - #4968

Merged
seisman merged 1 commit into
GenericMappingTools:mainfrom
mmporong:doc/fix-parameter-lists
Oct 28, 2026
Merged

seisman merged 1 commit into
GenericMappingTools:mainfrom
mmporong:doc/fix-parameter-lists

Conversation

@mmporong

Copy link
Copy Markdown
Contributor

Description of proposed changes

Some docstrings don't match the function signatures:

  • Figure.grdview: the parameter is listed as drapegrid, but the signature only has drape_grid now (the drapegrid alias was deprecated for removal in v0.20.0).
  • Figure.text: frame is in the signature and the alias list but has no entry. Added $frame.
  • Figure.tilemap: monochrome, no_clip, projection, frame, verbose, panel, perspective and transparency are explicit parameters but were not documented. Added $-placeholders for the common ones and short entries for monochrome and no_clip. The no_clip text follows what test_tilemap_no_clip checks: with no_clip=True the region is dropped and the whole tile extent is drawn.
  • pygmt.filter1d: the data parameter had no entry. Used the same wording as select/rose.

Only docstrings change. The rendered parameter lists were checked by applying the fmt_docstring substitutions: no $ placeholder is left, and every parameter in these four signatures now has an entry. ruff check and ruff format --check pass on the changed files.

triangulate.delaunay_triples also has spacing and registration in its signature without docstring entries. They are left alone here because it isn't clear whether they do anything without an output grid.

Preview:

Guidelines

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

- Figure.grdview: the parameter is listed as "drapegrid", but the
  function only accepts "drape_grid" now.
- Figure.text: document "frame".
- Figure.tilemap: document "monochrome", "no_clip", "projection",
  "frame", "verbose", "panel", "perspective" and "transparency".
- pygmt.filter1d: document "data".
@seisman seisman added this to the 0.20.0 milestone Oct 28, 2026
@seisman seisman added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Oct 28, 2026
@seisman
seisman merged commit f6baa21 into GenericMappingTools:main Oct 28, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants