-
Notifications
You must be signed in to change notification settings - Fork 122
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 API layout strategy #1294
add API layout strategy #1294
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1294 +/- ##
==========================================
+ Coverage 91.12% 91.17% +0.05%
==========================================
Files 51 51
Lines 6994 7015 +21
Branches 1001 1004 +3
==========================================
+ Hits 6373 6396 +23
+ Misses 444 443 -1
+ Partials 177 176 -1 ☔ View full report in Codecov by Sentry. |
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.
Sorry for the slow response. This looks really good to me. I was kind of surprised that this didn't exist yet in pystac.
…' into api_layout_strategy
Thanks for the review. I added a docstring |
@jsignell I had to resolve a conflict in the change log. Can you resubmit? |
Related Issue(s):
Description:
This PR implements the API Layout Strategy following the STAC API Specifications.
Unlike the Best Practice Layout Strategy, this strategy is not based on file paths. Instead, it uses HTTP endpoints. This requires refactoring of Catalog's
add_child
,add_item
, andupdate_href
methods not to remove the last path element. Instead, I moved this step into theHrefLayoutStrategy.get_href
method and made it conditional based on whether the path is a file or not.Together with #1295, this PR is part of setting the foundation for enabling API transactions using
pystac-client
.PR Checklist:
pre-commit
hooks pass locallyscripts/test
)