Skip to content

Commit 18bf7ab

Browse files
authored
Merge pull request #66 from earthdaily/dev
v0.1.4
2 parents 81f8bfd + b7e7c5a commit 18bf7ab

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.1.4] - 2024-05-23
8+
9+
### Fixed
10+
11+
- type str/list for `datacube` `mask_with`kwarg.
12+
13+
### Added
14+
15+
- unit tests for mask.
16+
17+
718
## [0.1.3] - 2024-05-22
819

920
### Changed

earthdaily/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# to hide warnings from rioxarray or nano seconds conversion
66
warnings.filterwarnings("ignore")
77

8-
__version__ = "0.1.3"
8+
__version__ = "0.1.4"

earthdaily/earthdatastore/cube_utils/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _datacube_masks(method, *args, **kwargs):
2121
@wraps(method)
2222
def _impl(self, *args, **kwargs):
2323
mask_with = kwargs.get("mask_with", None)
24-
if isinstance(mask_with, list) and len(mask_with) > 1:
24+
if isinstance(mask_with, list):
2525
kwargs.pop("mask_with")
2626
for mask in mask_with:
2727
try:
@@ -110,6 +110,7 @@ def _cube_odc(
110110

111111
if "geobox" in kwargs.keys() and "geopolygon" in kwargs.keys():
112112
kwargs.pop("geopolygon")
113+
113114
ds = stac.load(
114115
items_collection,
115116
bands=assets,

tests/test_simple_datacube.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def test_sentinel2(self):
2626
assets=["blue", "green", "red"],
2727
intersects=self.pivot,
2828
datetime="2023-07-01",
29+
mask_with=['native']
2930
)
3031
self.assertEqual(
3132
list(datacube.data_vars.keys()), ["blue", "green", "red"]

0 commit comments

Comments
 (0)