Skip to content

Easier to read aliases in docstrings #79

Closed

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.

Activity

  1. added
    help wanted
    on Dec 2, 2017
  2. added
    feature request
    and removed on Sep 17, 2018
  3. added this to the 0.2.0 milestone on May 5, 2020
  4. weiji14 commented on Jun 19, 2020

    @weiji14
    Member

    Resolved by #383 (napolean style docs) and #473 (document only the long alias). No more mentioning of short aliases, and we define the type in the brackets. I.e. projection (str) instead of projection (J).

  5. modified the milestones: 0.2.x, 0.1.x on Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requesthelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions