Skip to content

Conversation

MathewNWSH
Copy link
Contributor

@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.
  • updated async_prep_create_item for OS item load so it works with multiple indices

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
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
Contributor Author

Choose a reason for hiding this comment

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

done, thanks :)

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
Contributor Author

Choose a reason for hiding this comment

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

done, thanks :)

@MathewNWSH MathewNWSH changed the title better queryables better queryables and illegal_argument_exception fix for OS items load Sep 12, 2025
@jonhealy1 jonhealy1 self-requested a review September 22, 2025 05:49
Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

@MathewNWSH This looks really good. Can you add an entry in the changelog, in the Unreleased section. It looks like linting is failing too. Thanks!

@MathewNWSH
Copy link
Contributor Author

hey @jonhealy1
done and done :)

@jonhealy1 jonhealy1 self-requested a review September 23, 2025 15:43
Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

Thanks @MathewNWSH

@jonhealy1 jonhealy1 merged commit b80cf30 into stac-utils:main Sep 23, 2025
15 checks passed
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.

3 participants