From d394efde54f81aeab657d281113087ddce3b6555 Mon Sep 17 00:00:00 2001 From: Gabriele Tramonte Date: Thu, 12 Dec 2024 15:33:42 +0100 Subject: [PATCH] open_datacube infer zarr format from http path for streaming --- Dockerfile | 6 +++--- geokube/backend/netcdf.py | 2 ++ geokube/version.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 233ce07..6ceace6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ #new version with Zarr support FROM rg.fr-par.scw.cloud/geokube/geokube-base:2024.09.26.09.01 -COPY dist/geokube-0.2.7-py3-none-any.whl / -RUN pip install /geokube-0.2.7-py3-none-any.whl --break-system-packages -RUN rm /geokube-0.2.7-py3-none-any.whl +COPY dist/geokube-0.2.7a2-py3-none-any.whl / +RUN pip install /geokube-0.2.7a2-py3-none-any.whl --break-system-packages +RUN rm /geokube-0.2.7a2-py3-none-any.whl #ENV LD_LIBRARY_PATH=/opt/conda/x86_64-conda-linux-gnu/lib:/usr/lib/x86_64-linux-gnu \ No newline at end of file diff --git a/geokube/backend/netcdf.py b/geokube/backend/netcdf.py index 5082da5..428844f 100644 --- a/geokube/backend/netcdf.py +++ b/geokube/backend/netcdf.py @@ -47,6 +47,8 @@ def _get_engine(path: list | str): return "rasterio" elif ext == ".zarr": return "zarr" + elif path.startswith('http://') or path.startswith('https://'): + return "zarr" else: raise ValueError( f"there is not engine associated with the extension `{ext}`" diff --git a/geokube/version.py b/geokube/version.py index 8d83856..e6f6cd4 100644 --- a/geokube/version.py +++ b/geokube/version.py @@ -1 +1 @@ -__version__ = "0.2.7" \ No newline at end of file +__version__ = "0.2.7a2" \ No newline at end of file