Skip to content
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

Define XarraySource.from_stac() for more convenient creation of an XarraySource from a STAC Item or ItemCollection #2061

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

AdeelH
Copy link
Collaborator

@AdeelH AdeelH commented Feb 14, 2024

Overview

This PR moves most of the XarraySource creation code from XarraySourceConfig to XarraySource.from_stac(), which allows an XarraySource to be created directly from a STAC Item or ItemCollection without having to define an XarraySourceConfig. It also removes the not-useful num_channels_raw argument from XarraySource.__init__().

Checklist

  • Added unit tests, if applicable
  • Updated documentation, if applicable
  • Added needs-backport label if the change should be back-ported to the previous release
  • PR has a name that won't get you publicly shamed for vagueness

Notes

N/A

Testing Instructions

N/A

This moves most of the XarraySource creation code from XarraySourceConfig to XarraySource.from_stac(), which allows an XarraySource to be created directly from a STAC Item w/o having to define an XarraySourceConfig.
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (e6510d7) 89.75% compared to head (bd9884a) 89.69%.

Files Patch % Lines
...tervision/core/data/raster_source/xarray_source.py 70.83% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2061      +/-   ##
==========================================
- Coverage   89.75%   89.69%   -0.07%     
==========================================
  Files         196      196              
  Lines        9735     9736       +1     
==========================================
- Hits         8738     8733       -5     
- Misses        997     1003       +6     

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

@AdeelH AdeelH marked this pull request as ready for review February 14, 2024 20:09
@AdeelH AdeelH merged commit 1157b44 into azavea:master Feb 14, 2024
2 checks passed
@AdeelH AdeelH deleted the xr-stac branch February 14, 2024 20:15
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.

1 participant