stac-utils / stactools

Command line utility and Python library for STAC
https://stactools.readthedocs.io/
Other
104 stars 28 forks source link

Better ux when missing validate #469

Closed gadomski closed 9 months ago

gadomski commented 10 months ago

Related Issue(s):

Description: Before, if the validate optional dependency is not present:

$ stac validate
Usage: stac [OPTIONS] COMMAND [ARGS]...
Try 'stac --help' for help.

Error: No such command 'validate'.

After:

$ stac validate
Error: No such command 'validate'
This command is provided by an optional dependency 'validate'
To enable, install stactools with the optional dependency: pip install 'stactools[validate]'

I also added a message the command help:

$ stac --help | tail -n 9
  lint             Unsupported (needs `pip install 'stactools[validate]')
  merge            Merge items from one STAC into another.
  migrate          Migrate a STAC object to the latest version
  move-assets      Move or copy assets in a STAC catalog to the locations...
  summary          Summarize a STAC collection's contents.
  update-extent    Update a STAC collection's extent.
  update-geometry  Update an item geometry from an asset footprint
  validate         Unsupported (needs `pip install 'stactools[validate]')
  version          Display version info.

Doesn't need a changelog.

PR checklist: