Skip to content

Conversation

@jsignell
Copy link
Member

@jsignell jsignell commented Jan 20, 2025

Related Issue(s):

Description:

  • Allow media_type on get_links and get_single_link to an iterable
  • Use application/json", "application/geo+json" or None as the media_type for get_root_link, get_child_linksandget_item_links`

PR Checklist:

  • Pre-commit hooks and tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

* Allow media_type on get_links and get_single_link to
  an iterable
* Use `application/json", "application/geo+json" or None
  as the media_type for `get_root_link`, `get_child_links`
  and `get_item_links`
@codecov
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.47%. Comparing base (c033b51) to head (de8c63c).
Report is 29 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1497   +/-   ##
=======================================
  Coverage   91.46%   91.47%           
=======================================
  Files          54       54           
  Lines        7511     7518    +7     
  Branches      907      909    +2     
=======================================
+ Hits         6870     6877    +7     
  Misses        457      457           
  Partials      184      184           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs CHANGELOG as well as one DRY option.

@jsignell jsignell requested a review from gadomski January 23, 2025 14:18
@gadomski gadomski added this pull request to the merge queue Jan 23, 2025
Merged via the queue into stac-utils:main with commit 7e7d070 Jan 23, 2025
23 checks passed
kmodali pushed a commit to kmodali/pystac that referenced this pull request Oct 16, 2025
…pes (stac-utils#1497)

* `get_root|child|item_links` should be json-like

* Allow media_type on get_links and get_single_link to
  an iterable
* Use `application/json", "application/geo+json" or None
  as the media_type for `get_root_link`, `get_child_links`
  and `get_item_links`

* Dry up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Root link parsing is not filtering based on media types get_child_links/get_item_links: Ensure correct media type

2 participants