pygmt
pygmt copied to clipboard
Usage of underscores in aliases
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 bestraigthline,errorbar,no_datapygmt.Figure.rose():vector_params(M) Should bevectorparams.
Please note: This is primarily meant as a general question for understanding, rather than a request for renaming these aliases. :wink:
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 https://github.com/GenericMappingTools/pygmt/pull/1190#issuecomment-814451969 and added in https://github.com/GenericMappingTools/pygmt/pull/1256.
Thanks @maxrjones for the explanation and the background information!
I don't think we will rename these aliases. So closing the issue.