Skip to content
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

Better ux when missing validate #469

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

gadomski
Copy link
Member

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:

  • Code is formatted (run scripts/format).
  • Code lints properly (run scripts/lint).
  • Tests pass (run scripts/test).
  • Documentation has been updated to reflect changes, if applicable.
  • Changes are added to the CHANGELOG.

Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So nice!!

@gadomski gadomski merged commit e985fb6 into main Nov 21, 2023
19 checks passed
@gadomski gadomski deleted the better-ux-missing-validate branch November 21, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants