Add convenience method for accessing pystac_client
Related Issue(s):
- Closes #1334
Description:
from pystac.client import Client
PR Checklist:
- [x]
pre-commithooks pass locally - [x] Tests pass (run
scripts/test) - [ ] Documentation has been updated to reflect changes, if applicable
- [x] 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.
Codecov Report
Attention: Patch coverage is 38.46154% with 8 lines in your changes missing coverage. Please review.
Project coverage is 91.19%. Comparing base (
a88906b) to head (1ea5ae6). Report is 41 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| pystac/client.py | 38.46% | 7 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1365 +/- ##
==========================================
- Coverage 91.28% 91.19% -0.10%
==========================================
Files 51 52 +1
Lines 7221 7234 +13
Branches 1018 1019 +1
==========================================
+ Hits 6592 6597 +5
- Misses 450 457 +7
- Partials 179 180 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I can either ignore this file in coverage or I can try to figure out a test for the the case where pystac_client is not importable.
All right! I ended up ignoring mypy. Mypy passes if pystac_client is installed, but it didn't seem worth it to try to mock out a stub or something. Another option I suppose would be to add pystac_client as a test requirement, but that might not be desirable.
I just added a smidge of docs:
Love it! Thank you 🙏