-
Notifications
You must be signed in to change notification settings - Fork 105
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
Aggregation Extension #684
Conversation
That's great to see movement in that direction! I have some questions/comments.
Thanks in advance. |
Thank you for the comments @drnextgis
Ah, yes. The aggregation extension spec defines the methods for
The aggregation extension spec as-is relies only on the core item-search afaik. However, the one implementation in stac-server includes cql2
I am working on an implementation for elasticsearch and opensearch. I am not sure how an implementation would be handled in pgstac. |
stac_fastapi/extensions/stac_fastapi/extensions/core/aggregation/aggregation.py
Outdated
Show resolved
Hide resolved
from stac_fastapi.types.search import APIRequest | ||
|
||
|
||
@attr.s |
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.
can filter
be included in this? I'm not sure how the extensions interact.
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.
Yeah, I have tested with filter included on an implementation and it works great.
I am also not clear on how extension interact. For instance, could collections
, datetime
, bbox
, and intersects
be excluded here since they are part of the core search? I'm inclined to keep so the request class correlates directly to the extension spec.
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.
yeah, i think you should extend BaseSearchGetRequest and BaseSearchPostRequest and just add the aggregations
param. You also pickup limit
that's ignored, but that's find for a datamodel like this since there's a lot less duplication
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.
I have changed it to be build off base Search and Filter. This makes the implementation dependent on the Filter extension. But I don't think that is an issue.
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.
@jamesfisher-gis sorry I'm just realizing this now but I don't think we should do this, at least I don't see in the aggregate
extension why the filter
attributes should be enabled with the aggregations
ones.
I think it will be up to the implementers to add the filter
extension and also handle them in the client.
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.
Hey. That makes sense.
I have a couple other small bug fixes for aggregation. I will submit a PR today that removes the Filter extension dependency.
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.
maybe wait because I will submit a PR that takes care of #713 soon
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.
@jamesfisher-gis in fact, go ahead because my PR is a no-go in fact 😓
Sync branch with main
update conformance and spec urls (#691)
Hey @philvarner let me know what you think of the changes to this PR. I think it is close to being complete. |
Need to resolve conflicts too |
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.
LGTM - nice work
Let's get @vincentsarago thoughts on this |
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.
@jamesfisher-gis thanks for the great work.
The overall code looks good, I just have some worries about the inter dependencies of extensions and types submodule.
cc @jonhealy1
Linting |
@jonhealy1 Sorry, fixed |
@vincentsarago Hi Vincent. How does this look now? |
Great work @jamesfisher-gis |
Related Issue(s):
Description:
Adds base support for the STAC API Aggregation Extension
PR Checklist:
pre-commit
hooks pass locallymake test
)make docs
)