Skip to content

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

Closed

Description

@yvonnefroehlich

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.

Activity

  1. added
    question
    documentation
    on Nov 11, 2022
  2. seisman commented on Nov 11, 2022

    @seisman
    Member
  3. weiji14 commented on Nov 11, 2022

    @weiji14
    Member

    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

  4. changed the title [-]No aliases lists given in docs for `pygmt.triangulate*`[/-] [+]No aliases lists given in docs for some functions or methods[/+] on Nov 13, 2022
  5. yvonnefroehlich commented on Nov 13, 2022

    @yvonnefroehlich
    MemberAuthor

    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.

  6. added this to the 0.12.0 milestone on Feb 27, 2024
  7. removed
    question
    on Feb 27, 2024
  8. seisman commented on Feb 29, 2024

    @seisman
    Member

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

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

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions