Skip to content

Allow item types specified to be case insensitive in Data API and CLI #902

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

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

kevinlacaille
Copy link
Contributor

@kevinlacaille kevinlacaille commented Mar 28, 2023

Related Issue(s):

Closes #599

Proposed Changes:

For inclusion in changelog (if applicable):

  1. Added validation for item_type in the Data client, which allows item types to be case insensitive. Functions affected:
  • client: search(); CLI: search
  • client: create_search(); CLI: search-create
  • client: update_search(); CLI: search-update
  • client: get_stats(); CLI: stats

Not intended for changelog:

Diff of User Interface

Old behavior:

> planet data search psscene                                     
Error: {"general": [], "field": {"item_types": [{"message": "Not all item types requested exist or are accessible"}]}}

New behavior:

> planet data search psscene                                     
{"_links": {"_self": "https://api.planet.com/data/v1/item-types/PSScene/items/20230328_161317_49_241a", "assets": "https://api.planet.com/data/v1/item-types/PSScene/items/20230328_161317_49_241a/assets/", ...}

PR Checklist:

  • This PR is as small and focused as possible
  • [] If this PR includes proposed changes for inclusion in the changelog, the title of this PR summarizes those changes and is ready for inclusion in the Changelog.
  • [] I have updated docstrings for function changes and docs in the 'docs' folder for user interface / behavior changes
  • This PR does not break any examples or I have updated them

(Optional) @mentions for Notifications:

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@kevinlacaille kevinlacaille marked this pull request as ready for review March 28, 2023 21:12
Copy link
Member

@cholmes cholmes left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

Copy link
Contributor

@jreiberkyle jreiberkyle left a comment

Choose a reason for hiding this comment

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

works great! Could you update the PR desc to include the CLI commands that are affected by this as well?

@kevinlacaille kevinlacaille changed the title Allow item types specified to be case insensitive Allow item types specified to be case insensitive in Data API and CLI Mar 30, 2023
@kevinlacaille kevinlacaille merged commit 1daabcc into main Mar 30, 2023
@kevinlacaille kevinlacaille deleted the item-type-case-insensitive-599 branch March 30, 2023 16:42
@jreiberkyle jreiberkyle mentioned this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow item types specified to be case insensitive
3 participants