GenericMappingTools / GenericMappingTools/gmt
How to document long-form options, modifiers, and directives for GMT?
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
**Description of the issue**
Paul outlined the proposed implementation of GMT long-form options, modifiers, and directives in the [developer documentation](https://docs.generic-mapping-tools.org/dev/devdocs/long_options.html) (see also [project 1](https://github.com/GenericMappingTools/gmt/projects/1)). This issue is to decide the documentation structure for long-form options, modifiers, and directives.
**Comparison with wrappers**
The [GMT.jl documentation](https://www.generic-mapping-tools.org/GMT.jl/dev/) uses bars to separate the short option and its aliases and then uses links for the options that have long-formats for the modifiers/directives (e.g., https://www.generic-mapping-tools.org/GMT.jl/dev/arrows_control/#Vector-Attributes).
The [PyGMT documentation](https://www.pygmt.org/dev/) includes a table for short-form/long-form options at the start of each modules' documentation and currently does not implement long-format for modifiers/directives.
**Options for documenting long-options**:
Here are a few options (suggestions are welcome):
1. List the long-format documentation underneath the short format documentation. This would require deciding whether the long and short formats are shown just in the synopsis section or also in the description and arguments sections. For example:
> **I***xinc*[**+e|n**][/*yinc*[**+e|n**]]
> **increment**[**+exact|number**][/*yinc*[**+exact|number**]]
2. Add a dictionary showing the long-format for each option/module directive after the synopsis message
3. Have a separate tree for documentation of long-format GMT versus short-format GMT (similar to modern vs. classic documentation)
**Other issues**:
Will the long-options be documented both in the ReST documentation and the command line usage messages or only the ReST documentation? My vote is to only document in one place.
Contributor guide
Research direction
Start with the developer documentation page at docs.generic-mapping-tools.org/dev/devdocs/long_options.html and review the proposed long-form options, modifiers, and directives. Compare its structure with the linked GMT.jl and PyGMT documentation examples, then document an agreed approach for ReST pages and command-line usage messages. Done means the documentation structure and scope are decided.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100