-
Notifications
You must be signed in to change notification settings - Fork 27
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 collection search extension #136
Conversation
Great work. A queryables link seems to be missing in GET /collections, right? |
dab6638
to
4ab53fa
Compare
4ab53fa
to
2c64fc2
Compare
d5e1529
to
e5c5c40
Compare
0ac6b61
to
a5c57b5
Compare
@vincentsarago are you worried about the possibility of inconsistencies between the arguments in I'm sorry about all of the force pushes, I had to clean some things up in order to make the changes mergeable with main 😅 |
bbox: Optional[BBox] = None, | ||
datetime: Optional[DateTimeType] = None, | ||
limit: Optional[int] = None, |
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.
Thoughts from discussion: consider adding id
to the endpoint, despite it being omitted from the Collection Search 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.
Isn't that the same as just calling /collections/:id ?
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.
The use-case for including an ids
parameter would be to limit the scope of a search in the context of scoped authentication for a STAC API, but we discussed some more and it probably makes more sense to use the filter
extension for injecting scope limits in a search request.
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.
Yes, ids
would be a better parameter name than id
to evoke the ability to provide multiple as a filter. And for our specific needs today, we will make use of filter
as @hrodmn said. I believe it was @bitner who suggested adding the ability to filter by ID parameter, I'll let him weigh in on whether we should go without.
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 think it makes sense just to be parallel to the items spec (and yes, "ids" plural which is how it works in items)
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.
If you add it, I'd recommend to add a separate conformance class for it so that clients actually know whether it's supported or not.
PS: ids is not included in collection search as we just inherit from OGC API - Records, which doesn't have it. It's orthogonal to how ids is not part of OGC API - Features for items. ids is a STAC-specific thing.
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.
Unless someone else feels strongly, I think we can leave ids
out since it is not in the extension spec and if a user knows the collection IDs they could just make several calls to /collections/{id}
.
@vincentsarago I think we need a new release of stac-fastapi with the changes from stac-utils/stac-fastapi#745 in order to properly configure the collection-search extension with the other configured extensions. |
@hrodmn yes, I waited to see if we could also have stac-utils/stac-fastapi#744 merged but I haven't had a lot of time recently to work on this. |
f76592f
to
fb3c242
Compare
fb3c242
to
1dfb484
Compare
It looks like I am having some |
cbe7a56
to
a37401c
Compare
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. Left some very non-critical suggestions.
@vincentsarago thanks for your help getting this cleaned up, I think everything is looking good. I added some commits based on @alukach's suggestions. The only outstanding conversation is about the |
Related Issue(s):
Description:
Adds the collection search extension by pointing the
all_collections
method at the pgstac functioncollection_search
instead ofall_collections
.I have not tested to see if paging is implemented yet, need to upload a bunch of collections to my local db I guess! 😅
PR Checklist:
pre-commit
hooks pass locallymake test
)make docs
)