NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
13 stars 10 forks source link

CLI: Look into creating usage and help formatters and remove "usage" from ancillary_info #581

Closed jsolbrig closed 2 weeks ago

jsolbrig commented 1 month ago

Requested Update

Description

We should look at the possibility of removing "usage" form ancillary_info. We would achieve this by implementing custom formatters for CLI usage and help. These custom formatters should be capable of providing the full context of what a command requires in order to be run. For example, calling geoips list currently results in the following output:

> geoips list
usage: To use, type `geoips list <sub-cmd> <sub-sub-cmd>`.

where the returned text is hard-coded into ancillary_info.

A custom usage formatter might traverse the command hierarchy to construct something that looks like this automatically by recognizing which levels only have non-executable commands, which have only executable commands, and which have a mixture.

geoips list requires additional arguments:
usage: `geoips list sub-cmd [sub-cmd]`

geoips get requires additional arguments:
usage: `geoips get sub-cmd [sub-cmd] [sub-cmd]`

Background and Motivation

Once implemented, we won't need to maintain a repository of usages and will be able to update how usage is printed in a single location.

Checklist for Completion

jsolbrig commented 2 weeks ago

Closing for not in favor of a simpler solution.