opendatacube / eo-datasets

Easily write, validate and convert EO datasets and metadata.
Apache License 2.0
49 stars 26 forks source link

Fix pystac conversion for datasets with a datetime range #322

Closed Ariana-B closed 6 months ago

Ariana-B commented 6 months ago

stac.to_pystac_item assumes that the dataset will include the datetime property. However some datasets, like s2_barest_earth, include only start_datetime and end_datetime, causing an error when preparing the dataset for conversion to a pystac Item. Note that the Item datetime parameter can be None if start_datetime and end_datetime are provided in the properties, which they would be in the case of such datasets, so no datetime calculation/approximation is necessary here.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (ea49d65) 84.38% compared to head (36f5278) 84.39%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #322 +/- ## ======================================== Coverage 84.38% 84.39% ======================================== Files 26 26 Lines 4503 4504 +1 ======================================== + Hits 3800 3801 +1 Misses 703 703 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.