-
Couldn't load subscription status.
- Fork 42
add query/sort/fields extension support for item_collection #192
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
Conversation
…tor extensions mapping
| response_class=self.response_class, | ||
| endpoint=create_async_endpoint(self.client.get_queryables, CollectionUri), | ||
| ) | ||
| app.include_router(self.router, tags=["Filter Extension"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
register /collections/{col}/queryables endpoint for item_collection
|
@vincentsarago I am sure you have already thought of this but would it make sense to define |
|
|
cb9824b to
d4e229d
Compare
|
well it seems I broke something 🙈 Not sure what's going on! The from stac_fastapi.extensions.core import FilterExtension, SearchFilterExtension
FilterExtension().response_class
>>> stac_fastapi.api.models.JSONSchemaResponse
SearchFilterExtension().response_class
>>> stac_fastapi.api.models.JSONSchemaResponsemaybe it's something else 😬 Edit: fixed in stac-utils/stac-fastapi#796 |
|
we now have a pystac issue https://github.com/stac-utils/stac-fastapi-pgstac/actions/runs/13055953384/job/36438949990?pr=192 |
|
The issue looks unrelated (bands). Weird. Is that maybe an issue with the recently released upgrade of pystac to v1.1.0? |
|
@m-mohr yeah pretty sure this is related |
|
Pinning pystac to the latest 1.0.0 version probably helps until the tests are migrated to 1.1.0. |
|
this is the error we are getting # The way bands were declared in assets changed.
# In 1.0.0-beta.1 they are inlined into assets as
# opposed to having indices back into a property-level array.
if "eo:bands" in obj["properties"]:
bands = obj["properties"]["eo:bands"]
for asset in obj["assets"].values():
if "eo:bands" in asset:
new_bands: list[dict[str, Any]] = []
for band_index in asset["eo:bands"]:
> new_bands.append(bands[band_index])
E TypeError: list indices must be integers or slices, not dictmaybe we have to update our items stac-fastapi-pgstac/tests/data/test_item.json Lines 154 to 162 in df4c12a
|
|
I think we're good, I just tried locally with |
|
Yeah, I second-guessed switching migrate after we did it b/c I knew it'd break tests. Might have been a mistake ... |
|
@gadomski it's fine 👍 |
This is not yet ready but will love some feedback @hrodmn @m-mohrThis PR does:
fields,sortandqueryextension foritem_collectionendpoint