Skip to content

Add filter to Item and Collection get_assets method#936

Merged
gadomski merged 10 commits into
stac-utils:mainfrom
pjhartzell:issues/873-get-assets-filter
Jan 6, 2023
Merged

Add filter to Item and Collection get_assets method#936
gadomski merged 10 commits into
stac-utils:mainfrom
pjhartzell:issues/873-get-assets-filter

Conversation

@pjhartzell
Copy link
Copy Markdown
Collaborator

@pjhartzell pjhartzell commented Jan 4, 2023

Related Issue(s):
#873

Description:
Adds ability to filter Item and Collection Assets by media_type and role via get_assets() method.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • 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.

@pjhartzell pjhartzell changed the title feat: filter Item and Collection get_assets Add filter to Item and Collection get_assets method Jan 4, 2023
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 4, 2023

Codecov Report

❌ Patch coverage is 95.45455% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.43%. Comparing base (a66559a) to head (2919f0e).
⚠️ Report is 575 commits behind head on main.

Files with missing lines Patch % Lines
pystac/asset.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #936      +/-   ##
==========================================
+ Coverage   94.42%   94.43%   +0.01%     
==========================================
  Files          83       83              
  Lines       12016    12056      +40     
  Branches     1136     1143       +7     
==========================================
+ Hits        11346    11385      +39     
  Misses        492      492              
- Partials      178      179       +1     

☔ 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.

@gadomski gadomski self-requested a review January 5, 2023 21:35
@gadomski gadomski added this to the 1.7 milestone Jan 5, 2023
@gadomski gadomski linked an issue Jan 5, 2023 that may be closed by this pull request
Comment thread pystac/collection.py Outdated
Comment thread pystac/item.py Outdated
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 00:21
Comment thread pystac/collection.py Outdated
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 19:48
Comment thread CHANGELOG.md
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 20:43
Comment thread pystac/collection.py Outdated
Comment thread pystac/item.py Outdated
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 22:19
@gadomski gadomski merged commit 76e4dca into stac-utils:main Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add role, media_type filtering arguments to Item.get_assets

3 participants