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

No aliases lists given in docs for some functions or methods #2185

Closed
yvonnefroehlich opened this issue Nov 10, 2022 · 4 comments
Closed

No aliases lists given in docs for some functions or methods #2185

yvonnefroehlich opened this issue Nov 10, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@yvonnefroehlich
Copy link
Member

yvonnefroehlich commented Nov 10, 2022

There are no aliases lists given in the documentation for the class pygmt.triangulate and its methods

Is this intended?


Edit (see comment by @weiji14 below): This is simliar for the class pygmt.grdhisteq and its methods pygmt.grdhisteq.compute_bins and pygmt.grdhisteq.equalize_grid.

@yvonnefroehlich yvonnefroehlich added question Further information is requested documentation Improvements or additions to documentation labels Nov 11, 2022
@seisman
Copy link
Member

seisman commented Nov 11, 2022

Ping @weiji14

@weiji14
Copy link
Member

weiji14 commented Nov 11, 2022

The regular_grid and delaunay_triples functions don't use the @use_alias decorator as seen here:

@staticmethod
@fmt_docstring
def regular_grid( # pylint: disable=too-many-arguments,too-many-locals

@staticmethod
@fmt_docstring
def delaunay_triples( # pylint: disable=too-many-arguments,too-many-locals

so the {aliases} shortcode won't work.

We could discuss whether it's worth spending time to add the alias list, though it would be quite involved I think (also considering the eventual goal is to drop single character aliases, xref #262).

What might be a better use of time is to wrap the remainder of the short parameters in https://docs.generic-mapping-tools.org/6.4/triangulate.html (e.g. -A, -C, etc) that don't yet have a long alias in PyGMT. The original implementation of triangulate at #731 was only meant to do a minimum set of these aliases.

P.S. The same issue also applies for https://www.pygmt.org/v0.7.0/api/generated/pygmt.grdhisteq.html

@yvonnefroehlich yvonnefroehlich changed the title No aliases lists given in docs for pygmt.triangulate* No aliases lists given in docs for some functions or methods Nov 13, 2022
@yvonnefroehlich
Copy link
Member Author

I apologize for my delayed response! Thanks @weiji14 for your explanation!

The regular_grid and delaunay_triples functions don't use the @use_alias decorator [...] so the {aliases} shortcode won't work.

Yes, I realized this, when I added the {aliases} short code and locally testing failed 😉.

We could discuss whether it's worth spending time to add the alias list, though it would be quite involved I think (also considering the eventual goal is to drop single character aliases, xref #262).

I can not comment on how much effort adding the alias list would be. Could this be done in a general way and applied to all functions and methods which currently do not have an alias list in the documentation?

What might be a better use of time is to wrap the remainder of the short parameters in https://docs.generic-mapping-tools.org/6.4/triangulate.html (e.g. -A, -C, etc) that don't yet have a long alias in PyGMT. The original implementation of triangulate at #731 was only meant to do a minimum set of these aliases.

From a long-term perspective and considering the proposed goal to drop the single chracter aliases, I feel, as mention by @weiji14, it makes sense to prioritize wrapping the remainder of the short parameters.

P.S. The same issue also applies for https://www.pygmt.org/v0.7.0/api/generated/pygmt.grdhisteq.html

I adjusted the title of the issue and my initial comment above.

@seisman
Copy link
Member

seisman commented Feb 29, 2024

The issue has been addressed in PR #3073 and #3076. Closing.

@seisman seisman closed this as completed Feb 29, 2024
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
Projects
None yet
Development

No branches or pull requests

3 participants