From abe2c28d58a939d567261c17d30f914a8d0aa054 Mon Sep 17 00:00:00 2001 From: ayushnag <35325113+ayushnag@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:57:37 -0800 Subject: [PATCH] pyproject and formatting --- earthaccess/virtualizarr.py | 3 ++- pyproject.toml | 7 +++++++ tests/integration/test_virtualizarr.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/earthaccess/virtualizarr.py b/earthaccess/virtualizarr.py index 0bcbb655..69122163 100644 --- a/earthaccess/virtualizarr.py +++ b/earthaccess/virtualizarr.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: import xarray as xr + def open_virtual_mfdataset( granules: list[earthaccess.DataGranule], group: str | None = None, @@ -161,7 +162,7 @@ def open_virtual_dataset( Create an xarray dataset with indexes and lazy loaded data. When true, creates a lazy loaded, numpy/dask backed xarray dataset with indexes. Note that when `load=True` all the data is now available to access but not loaded into memory. When `load=False` a virtual xarray dataset is created with ManifestArrays. This virtual dataset is a view over the underlying metadata and chunks and allows creation and concatenation of zarr reference files. This virtual dataset cannot load data on it's own and see https://virtualizarr.readthedocs.io/en/latest/ for more information on virtual xarray datasets. - + Returns: ---------- diff --git a/pyproject.toml b/pyproject.toml index 1485125c..c1a55ae2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,9 @@ kerchunk = [ "h5netcdf", "xarray", ] +virtualizarr = [ + "virtualizarr @ git+https://github.com/zarr-developers/VirtualiZarr.git" +] dev = [ "bump-my-version >=0.10.0", "nox", @@ -82,6 +85,7 @@ test = [ "types-setuptools >=0.1", "vcrpy >=6.0.1", "earthaccess[kerchunk]", + "earthaccess[virtualizarr]", ] docs = [ "jupyterlab >=3", @@ -122,6 +126,9 @@ docs = [ [tool.pytest] filterwarnings = ["error::UserWarning"] +[tool.hatch.metadata] +allow-direct-references = true + [tool.mypy] python_version = "3.10" files = ["earthaccess", "tests"] diff --git a/tests/integration/test_virtualizarr.py b/tests/integration/test_virtualizarr.py index 05281042..aaf93260 100644 --- a/tests/integration/test_virtualizarr.py +++ b/tests/integration/test_virtualizarr.py @@ -16,7 +16,7 @@ @pytest.fixture( - scope="module", params=["MUR25-JPL-L4-GLOB-v04.2", "SWOT_L2_LR_SSH_Basic_2.0"] + scope="module", params=["MUR25-JPL-L4-GLOB-v04.2"] ) def granule(request): granules = earthaccess.search_data(