-
Notifications
You must be signed in to change notification settings - Fork 48
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
allow to write queryables #698
base: main
Are you sure you want to change the base?
Conversation
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.
A couple of questions/issues:
Unless I'm mistaken, this PR isn't enough to actually POST to urls becuase of this check:I see you address this in your PR comment — how hard would it be to add a general transaction-enabledpystac-client/pystac_client/stac_api_io.py
Lines 227 to 228 in 4a7bb2c
if _is_url(href): raise APIError("Transactions not supported") StacApiIO
as wellStacIO
subclass to this PR?- Is writing to
queryables
documented anywhere? I just re-read the filter extension text and didn't see any reference. I'm a bit hesitant to add functionality to pystac-client that isn't documented in the spec or an extension.
Co-authored-by: Pete Gadomski <[email protected]>
This should be straight forward, but I think this is a PR of its own.
No, I also could not find any references. However, there needs to be away to update queryables, in particular since collection queryables may differ from catalog queryables. What is the best approach here? Make a PR to the filter extension and propose an optional POST/ PUT method for the queryables endpoint? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #698 +/- ##
==========================================
+ Coverage 93.43% 94.03% +0.60%
==========================================
Files 13 13
Lines 990 1006 +16
==========================================
+ Hits 925 946 +21
+ Misses 65 60 -5 ☔ View full report in Codecov by Sentry. |
Sounds good to me.
That would be my recommendation — if you're able to make one of the STAC community meetings (managed by this Google Group) to discuss the proposal that would help the idea get traction too. Have you seen this behavior used elsewhere in the community? |
Ok, I will give it a shot. I haven't seen it elsewhere but am wondering how else people would determine what fields you can query in your collection. For our use case, we index a standard set of fields. If a user wants to index other fields instead for their collection, updating the queryables endpoint will trigger reindexing of the collection |
After talking about it a bit with folks, I think that before adding this functionality, I'd want to first see this functionality defined in an extension (probably https://github.com/stac-api-extensions/transaction) and then advertised via a conformance class so that clients, including pystac-client, know that it's supported. |
ok, I can work on that. I would have suggested to add it to the filter extension, since queryables are defined there. |
Converting to draft until we've got an extension to reference. |
Related Issue(s):
Description:
Queryables are currently read-only. This PR adds two methods to the
QueryablesMixin
The methods allow users to write queryables back to their API. For writing back to a REST endpoint the
stac_io
class used by the client will have to implement transactions and the API has to support updating queryables.PR Checklist: