GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

Allow multiple aliases for the same option flag #2751

Closed seisman closed 5 months ago

seisman commented 11 months ago

See https://github.com/GenericMappingTools/gmt/pull/7923 for context.

In PyGMT, -j is aliased to distcal, but upstream GMT suggests metric.

We need to discuss if we want to allow multiple aliases or deprecate distcal to metric.

yvonnefroehlich commented 11 months ago

At the moment, I prefer to have exactly one alias for one option flag. I personally find it confusing to have multiple aliases, as it indicates a difference that actually does not exist. However, the Julia wrapper seems to allow for multiple aliases. Hm... Is there a "Pythonic rule" regarding this issue or decision?

I agree that it is confusing to have different aliases between GMT and PyGMT, and we should try to focus on consistency.

In case we decide on multiple aliases, how is this realized in the examples? Do we want to define a "preferred" or "recommended" alias, which is then used in all examples? Or do we have to update the examples to mention all available aliases? If we used different aliases across the examples for the same thing, I feel that at least new users would definitely get confused.

seisman commented 5 months ago

I think multiple aliases cause more trouble than benefits. Closing the issue and feel free to reopen the issue if you don't argee.