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

Add support for setting the filter language via CLI #140

Merged
merged 3 commits into from
Apr 19, 2022

Conversation

torse
Copy link

@torse torse commented Feb 18, 2022

Related Issue(s): #139

Description:

This PR add support for setting the filter language with a new cli parameter --filter-lang. If not set, it defaults to cql-json. This allows for using e.g. cql-text filter by specifying

--filter 'eo:cloud_cover < 60' 
--filter-lang "cql2-text"

PR Checklist:

  • Code is formatted
  • Tests pass
  • Changes are added to the CHANGELOG

@torse
Copy link
Author

torse commented Feb 21, 2022

I intentionally kept the default value of the --filter-lang as cql-json to keep the backwards-compatibility. However according to the filter extension spec, the default value of the filter language depends on the method:

If undefined, defaults to cql2-text for a GET request and cql2-json for a POST request.

Would you like the defaults of the CLI parameters to be updated accordingly?

@matthewhanson matthewhanson merged commit 4eaab55 into stac-utils:main Apr 19, 2022
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.

None yet

2 participants