-
Notifications
You must be signed in to change notification settings - Fork 228
Document conventions for ordering aliases and arguments in contributing.md #884
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
Comments
I did not find a conversation that settled on this convention in a quick search of past issues (apologies if I missed this). While alphabetically by short option is easily readable for the aliases section of the docs, I actually think that it makes it hard to find things in the |
Yes, things are a bit inconsistent, and I don't think we've spelt this out in any previous issue, so thanks for raising this to our attention!
Agree on this, I think the code line at pygmt/pygmt/helpers/decorators.py Line 206 in 805f533
We can discuss a bit more about sorting alphabetically. A couple of points to consider:
Of course, it's hard for someone starting out to know what is 'important' or not (i.e. very subjective). So maybe we can find a balance somehow so that new users can jump in without having to familiarize themselves too much with the GMT world. |
Should we add a separate section in |
I'm part-way through adding a section with general instructions for wrapping a module (https://github.com/GenericMappingTools/pygmt/commits/wrap-module-instructions). That would be a good place to put the convention, but I will not include them in the PR from that branch so that any necessary discussion could happen separately. |
I think the list of aliases is mainly relevant for PyGMT users coming from GMT. To easily find the alias corresponding to a single letter, an alphabetical order is helpful. About the order within the parameter section, I have to think in more detail. So far, I would say the required parameters should be listed at the beginning. |
Description of the desired feature
Most of the PyGMT modules order aliases and arguments alphabetically by the GMT short option. I think it would be helpful to add this convention (if it is decided) to the contributing guidelines under example code standards.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: