Skip to content

Conversation

MathewNWSH
Copy link

@MathewNWSH MathewNWSH commented Sep 4, 2025

added missing copy(), updated DEFAULT_QUERYABLES so it contains only generic attributes
Description:

  • Removed bug (missing copy()) causing default queryables to be enriched by queryables from previous queryables endpoint query.
  • Removed attributes cloud_cover, cloud_shadow_percentage, nodata_pixel_percentage since these are not generic for all collections ex. SAR data.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

"$schema" to the one from pgstac (seems newer and more advanced)
"$id" made it dynamic
@@ -20,6 +21,7 @@ class EsAsyncBaseFiltersClient(AsyncBaseFiltersClient):
async def get_queryables(
self, collection_id: Optional[str] = None, **kwargs
) -> Dict[str, Any]:
request: Optional[Request] = kwargs.get("request").url
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, you put code before a docstring, which I believe removes the docstring from the method. This typing : Optional[Request] also seems incorrect. url with either be of Url or str type.

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks :)

@@ -38,8 +40,8 @@ async def get_queryables(
Dict[str, Any]: A dictionary containing the queryables for the given collection.
"""
queryables: Dict[str, Any] = {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://stac-api.example.com/queryables",
"$schema": "https://json-schema.org/draft-07/schema#",
Copy link
Contributor

Choose a reason for hiding this comment

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

An empty fragment # in links does nothing. May as well remove the extra character to keep the link clean.

Copy link
Author

Choose a reason for hiding this comment

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

done, thanks :)

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