-
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
Update pagination to work with pgstac 0.9.X #140
Update pagination to work with pgstac 0.9.X #140
Conversation
I see the goal right now is probably to get 3.0.0 released so we can wait to merge this in until after that if folks like this change. |
thanks @zstatmanweil this looks great 🙏
yeah, I've just pushed the release. I'll be back from holidays next week and I'll look at this PR 🙏 |
hey @vincentsarago ! Any thoughts on this PR? |
sorry @zstatmanweil I let this slipped 😓 I think the PR looks good but we would need to add tests First I think we will need to update the tests suite to be able to test multiple version of pgstac. I can work on this early next week |
No worries! I assumed, which is why I bugged. Ok sounds good, let me know if/how I can help. |
@@ -17,13 +17,13 @@ | |||
"buildpg", | |||
"brotli_asgi", | |||
"pygeofilter>=0.2", | |||
"pypgstac==0.8.*", | |||
"pypgstac>=0.8,<0.10", |
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.
stac-fastapi-pgstac should be compatible with 0.8 and 0.9
] | ||
|
||
extra_reqs = { | ||
"dev": [ | ||
"pystac[validation]", | ||
"pypgstac[psycopg]==0.8.*", | ||
"pypgstac[psycopg]==0.9.*", |
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.
we use pgstac 0.9.x in tests
@zstatmanweil I'll try to merge this week but we need to fix some issue with collection-search #155 |
Thanks for the update @vincentsarago ! |
well it seems that we will get this PR merged first before #155 |
0c5f2ad
to
1b3e871
Compare
@vincentsarago , do you know when you might cut a new release? I can always use "latest" if it isn't going to be soon. |
I'm waiting on a pastac release to finish some other PR |
Related Issue(s):
Description:
pgstac
v0.9.x now returns prev and next tokens as links in the search returned from the database. This means the current version of the service with the most recent pgstac backend doesn't properly allow for pagination. The links returned by pgstac v0.9.x are formatted with aGET
method request. At first I just passed in the search response's links asextra_links
here in the code, which worked with GET requests but does not work with the formatting for POST requests. To simplify, I am now extracting the next and prev token from the links if they exist and don't change how they are handled in the rest of the code.I ensured tests passed with v0.8.5 and v0.9.1. I also ran GET and POST searches for both and confirmed the link responses were the same.
v0.8.5 GET
0.9.1 GET
0.8.5 POST
0.9.0 POST
PR Checklist:
pre-commit
hooks pass locallymake test
)make docs
)