Skip to content

Consistently list all common options alphabetically at the end of docstrings #4285

@seisman

Description

@seisman

GMT modules share many common options (e.g., -J, -R), and most PyGMT methods/functions provide corresponding common aliases (e.g., projection, region). At present, these aliases are listed inconsistently in docstrings and are often placed at the very beginning. I believe it would make more sense to group them at the end instead.

The reasons are:

  • Upper-case GMT options (-B, -J, -R, -V) are not central to most individual modules. In typical plotting workflows, only the first plotting command needs to specify -J, -R, and -B.
  • Users are generally already familiar with these common options and are more interested in learning about the parameters that are unique to a given function or method.

So, I propose the following:

  • List all common options alphabetically at the end of docstrings, rather than interleaving them with module-specific parameters.
  • Add a dedicated subsection (e.g., “Common Parameters”) to clearly separate shared options from parameters that are unique to each function or method. [Depending on if it looks better or worse]

This structure would improve readability, make docstrings more consistent across PyGMT, and help users focus on the parameters that matter most for a given module.

Metadata

Metadata

Labels

maintenanceBoring but important stuff for the core devs

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions