Skip to content

Easier to read aliases in docstrings #79

@leouieda

Description

@leouieda

Right now, the parameter aliases (region for R, projection for J) are listed above the parameter descriptions. This is a bit hard to read because you have to go back and forth between the alias list and descriptions.

It would be better for the parameter names to be listed as the long alias and include the original 1 letter name next to it.

For example, this is how it is now:

Aliases
-------
* J = projection

Parameters
----------
J : string
    The projection bla bla bla

and what I would like to see is:

Aliases
-------
* J = projection

Parameters
----------
projection (J) : string
    The projection bla bla bla

This can be in the fmt_docstring decorator in gmt/decorators.py. It might make it easier to define all descriptions of the GMT module arguments outside of the docstring (like we do already for the common ones, like J and R). The Python specific arguments, usually for passing in data, don't have aliases and could be specified normally on the docstring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions