diff --git a/docker/constraints.txt b/docker/constraints.txt index 54cc70a8..41fbcdb3 100644 --- a/docker/constraints.txt +++ b/docker/constraints.txt @@ -1,11 +1,11 @@ # -# This file is autogenerated by pip-compile with python 3.8 +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile --no-annotate --no-build-isolation --output-file=constraints.txt --strip-extras requirements.txt # affine==2.3.0 -aiobotocore==1.4.2 +aiobotocore==2.0.0 aiohttp==3.7.4.post0 aioitertools==0.8.0 alabaster==0.7.12 @@ -13,7 +13,7 @@ argon2-cffi==20.1.0 astroid==2.7.2 async-timeout==3.0.1 attrs==21.2.0 -awscli==1.19.106 +awscli==1.21.8 azure-core==1.17.0 azure-storage-blob==12.8.1 babel==2.9.1 @@ -21,8 +21,8 @@ backcall==0.2.0 bleach==4.0.0 bokeh==2.3.3 boltons==21.0.0 -boto3==1.17.106 -botocore==1.20.106 +boto3==1.19.8 +botocore==1.22.8 bottleneck==1.3.2 cachetools==4.2.2 cattrs==1.8.0 @@ -42,7 +42,6 @@ cryptography==3.4.7 cycler==0.10.0 dask==2021.8.1 dask-image==0.6.0 -dataclasses==0.6 datacube==1.8.6 debugpy==1.4.1 decorator==5.0.9 @@ -115,6 +114,7 @@ notebook==6.4.3 numexpr==2.7.3 numpy==1.21.2 oauthlib==3.1.1 +odc-stac==0.2.2 ordered-set==4.0.2 packaging==21.0 pandas==1.3.2 @@ -168,7 +168,7 @@ rio-stac==0.3.1 rsa==4.7.2 ruamel.yaml==0.17.13 ruamel.yaml.clib==0.2.6 -s3transfer==0.4.2 +s3transfer==0.5.0 scikit-image==0.18.2 scipy==1.7.1 send2trash==1.8.0 diff --git a/docker/requirements.txt b/docker/requirements.txt index e574873d..0b990cc3 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -25,16 +25,19 @@ datacube[dev]==1.8.6 # need to constrain this one for pip-sake # Fixing this allows pip resolution without constraints.txt -aiobotocore[boto3,awscli]==1.4.2 +aiobotocore[boto3,awscli]==2.0.0 # Make sure dask has all the features enabled dask[complete] -eodatasets3 +eodatasets3>=0.22.0 -# not needed for python 3.8 and up, and are not installed, -# but `pip check` doesn't know better -dataclasses +# hdstats for open source version: +hdstats>=0.1.8 + +# hdstats for faster binary-only version: +# --extra-index-url https://packages.dea.ga.gov.au/ +# hdstats==0.1.8.post1 # other top level dependencies of odc. libraries/apps affine @@ -45,7 +48,6 @@ dask_image deepdiff fsspec google-cloud-storage -hdstats>=0.1.7.post5 ipyleaflet ipywidgets jinja2 @@ -69,3 +71,5 @@ toolz tqdm xarray zstandard + + diff --git a/odc/stats/_version.py b/odc/stats/_version.py index 2e7eac1a..9e604c04 100644 --- a/odc/stats/_version.py +++ b/odc/stats/_version.py @@ -1 +1 @@ -__version__ = "1.0.6a" +__version__ = "1.0.7" diff --git a/odc/stats/plugins/_base.py b/odc/stats/plugins/_base.py index 356a1df0..e8d289c5 100644 --- a/odc/stats/plugins/_base.py +++ b/odc/stats/plugins/_base.py @@ -6,6 +6,7 @@ from datacube.utils.geometry import GeoBox from odc.algo import to_rgba from odc.algo.io import load_with_native_transform +from odc.algo._masking import _nodata_fuser class StatsPluginInterface(ABC): @@ -40,7 +41,7 @@ def native_transform(self, xx: xr.Dataset) -> xr.Dataset: return xx def fuser(self, xx: xr.Dataset) -> xr.Dataset: - return xx + return _nodata_fuser(xx) def input_data(self, datasets: Sequence[Dataset], geobox: GeoBox) -> xr.Dataset: xx = load_with_native_transform( diff --git a/odc/stats/plugins/gm.py b/odc/stats/plugins/gm.py index cae7171f..6fa9e3eb 100644 --- a/odc/stats/plugins/gm.py +++ b/odc/stats/plugins/gm.py @@ -1,7 +1,7 @@ """ Geomedian """ -from typing import Optional, Sequence, Tuple, Iterable +from typing import Optional, Mapping, Sequence, Tuple, Iterable import xarray as xr from datacube.model import Dataset from datacube.utils.geometry import GeoBox @@ -30,6 +30,8 @@ def __init__( ): self.bands = tuple(bands) self._mask_band = mask_band + if nodata_classes is not None: + nodata_classes = tuple(nodata_classes) self._nodata_classes = nodata_classes input_bands = self.bands if self._nodata_classes is not None: @@ -41,11 +43,12 @@ def __init__( basis=basis_band or self.bands[0], **kwargs) - if nodata_classes is not None: - nodata_classes = tuple(nodata_classes) - self.cloud_classes = tuple(cloud_classes) + # if filters: + # self.filters: Optional[Mapping] = dict(filters) self.filters = filters + # else: + # self.filters = None self._renames = aux_names self.aux_bands = tuple(