Skip to content

Commit

Permalink
pyproject and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushnag committed Nov 14, 2024
1 parent ed4a98b commit abe2c28
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion earthaccess/virtualizarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
if TYPE_CHECKING:
import xarray as xr


def open_virtual_mfdataset(
granules: list[earthaccess.DataGranule],
group: str | None = None,
Expand Down Expand Up @@ -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:
----------
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -82,6 +85,7 @@ test = [
"types-setuptools >=0.1",
"vcrpy >=6.0.1",
"earthaccess[kerchunk]",
"earthaccess[virtualizarr]",
]
docs = [
"jupyterlab >=3",
Expand Down Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_virtualizarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit abe2c28

Please sign in to comment.