Skip to content

Add filter to Item and Collection get_assets method #936

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

Merged
merged 10 commits into from
Jan 6, 2023

Conversation

pjhartzell
Copy link
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

codecov-commenter commented Jan 4, 2023

Codecov Report

Base: 94.37% // Head: 94.38% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (297e415) compared to base (017ddfd).
Patch coverage: 95.45% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #936      +/-   ##
==========================================
+ Coverage   94.37%   94.38%   +0.01%     
==========================================
  Files          83       83              
  Lines       12015    12055      +40     
  Branches     1136     1143       +7     
==========================================
+ Hits        11339    11378      +39     
  Misses        496      496              
- Partials      180      181       +1     
Impacted Files Coverage Δ
pystac/asset.py 84.21% <50.00%> (-1.91%) ⬇️
pystac/collection.py 93.43% <100.00%> (+0.55%) ⬆️
pystac/item.py 89.05% <100.00%> (+0.33%) ⬆️
tests/test_collection.py 99.62% <100.00%> (+0.01%) ⬆️
tests/test_item.py 99.56% <100.00%> (+0.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@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
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 00:21
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 19:48
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
@pjhartzell pjhartzell requested a review from gadomski January 6, 2023 20:43
@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