-
Notifications
You must be signed in to change notification settings - Fork 122
Use only search link supporting the json mimeType #704
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
Conversation
@mneagul Thanks for submitting this. I think that changing However, I think it would be useful to add an optional |
Regarding how this applies specifically to The It might also be worth adding a |
Thank you for your feedback and sorry for the late response. I will try to reflect this in the pull request. The pull request was mainly motivated by the the need to use the STAC implementation in geoserver |
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.
@mneagul Could you run the test & lint checks by running ./scripts/test
at the top level of the repo? I'm getting a few formatting and type hint errors when I run that.
It also looks like there is a conflict in CHANGELOG.md
so you will probably need to rebase your branch onto stac-utils/main
.
Thanks!
@duckontheweb I see "This branch has conflicts that must be resolved" so looks like it needs to merge upstream? |
2b45ec2
to
9ceae79
Compare
…` and `get_links`
Codecov Report
@@ Coverage Diff @@
## main #704 +/- ##
=======================================
Coverage 94.54% 94.55%
=======================================
Files 79 79
Lines 11606 11621 +15
Branches 1370 1370
=======================================
+ Hits 10973 10988 +15
Misses 455 455
Partials 178 178
Continue to review full report at Codecov.
|
I created a new PR in pystack-client: stac-utils/pystac-client#142 using the functionality added in this PR. |
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.
@mneagul Thanks for contributing this, looks good! Lets add a couple of tests to the CatalogTest
class in tests/test_catalog.py
that use the new media_type
argument in get_links
and get_single_link
and then I think this is ready to merge.
I added tests for both functions, including a sample catalog. |
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, @mneagul, I feel like I'm putting you through the ringer with this PR...
I left some suggested changes and comments regarding creating a new test case, but the changes look good otherwise.
Co-authored-by: Jon Duckworth <duckontheweb@gmail.com>
Co-authored-by: Jon Duckworth <duckontheweb@gmail.com>
Co-authored-by: Jon Duckworth <duckontheweb@gmail.com>
I was unaware of the interaction between |
Co-authored-by: Jon Duckworth <duckontheweb@gmail.com>
@mneagul Once |
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.
Thanks again. I'll include this in the 1.4.0 release.
Related Issue(s):
N/A
Description:
pystac allways selects the first search link without taking into consideration the mimeType. For STAC catalogs offering multiple search links with different mimeTypes this might result in erroneous selection of the search link (eg. in case the first search link points to an endpoint returning
text/html
or a different represenation)PR Checklist:
pre-commit run --all-files
)scripts/test
)