Skip to content

Usage of underscores in aliases #2014

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

Closed
yvonnefroehlich opened this issue Jul 19, 2022 · 3 comments
Closed

Usage of underscores in aliases #2014

yvonnefroehlich opened this issue Jul 19, 2022 · 3 comments
Labels
question Further information is requested

Comments

@yvonnefroehlich
Copy link
Member

In the Contributors Guide in the section Code Style:

When wrapping a new alias, use an underscore to separate words bridged by vowels (aeiou), such as no_skip and z_only. Do not use an underscore to separate words bridged only by consonants, such as distcalc, and crossprofile. This convention is not applied by the code checking tools, but the PyGMT maintainers will comment on any pull requests as needed.

However, some aliases seem not to follow this convention. For example:

  • pygmt.Figure.plot(): straight_line (A) , error_bar (E), nodata (d)
    Following the convention, they should be straigthline, errorbar , no_data
  • pygmt.Figure.rose(): vector_params (M)
    Should be vectorparams.

Please note: This is primarily meant as a general question for understanding, rather than a request for renaming these aliases. 😉

@seisman seisman added the question Further information is requested label Jul 20, 2022
@maxrjones
Copy link
Member

I think that the aliases that do not follow this convention were added to PyGMT before the convention was established. For context, the idea of a convention to ensure consistency for alias names was first suggested in #1190 (comment) and added in #1256.

@yvonnefroehlich
Copy link
Member Author

Thanks @maxrjones for the explanation and the background information!

@seisman
Copy link
Member

seisman commented Dec 15, 2023

I don't think we will rename these aliases. So closing the issue.

@seisman seisman closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants