Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier to read aliases in docstrings #79

Closed
leouieda opened this issue Dec 2, 2017 · 1 comment
Closed

Easier to read aliases in docstrings #79

leouieda opened this issue Dec 2, 2017 · 1 comment
Labels
feature request New feature wanted help wanted Helping hands are appreciated
Milestone

Comments

@leouieda
Copy link
Member

leouieda commented Dec 2, 2017

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.

@leouieda leouieda added feature help wanted Helping hands are appreciated labels Dec 2, 2017
@leouieda leouieda added feature request New feature wanted and removed feature labels Sep 17, 2018
@weiji14 weiji14 added this to the 0.2.0 milestone May 5, 2020
@weiji14
Copy link
Member

weiji14 commented Jun 19, 2020

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).

@weiji14 weiji14 closed this as completed Jun 19, 2020
@weiji14 weiji14 modified the milestones: 0.2.x, 0.1.x Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted help wanted Helping hands are appreciated
Projects
None yet
Development

No branches or pull requests

2 participants