Skip to content

Commit

Permalink
fix duplicate file and import name
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushnag committed Dec 6, 2024
1 parent a9a9234 commit 760f340
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion earthaccess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
search_services,
)
from .auth import Auth
from .dmrppzarr import open_virtual_dataset, open_virtual_mfdataset
from .kerchunk import consolidate_metadata
from .search import DataCollection, DataCollections, DataGranule, DataGranules
from .services import DataServices
from .store import Store
from .system import PROD, UAT
from .virtualizarr import open_virtual_dataset, open_virtual_mfdataset

logger = logging.getLogger(__name__)

Expand Down
9 changes: 4 additions & 5 deletions earthaccess/virtualizarr.py → earthaccess/dmrppzarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def open_virtual_mfdataset(
parallel: bool = True,
**xr_combine_nested_kwargs,
) -> xr.Dataset:
"""Open multiple granules as a single virtual xarray Dataset.
"""Open multiple granules as a single virtual xarray Dataset. WARNING: This feature is current experimental and may change in the future. This feature relies on dmr++ metadata files which may not always be present for your dataset.
Uses DMR++ metadata files to create a virtual xarray dataset with ManifestArrays. This virtual dataset can be used to create zarr reference files. See https://virtualizarr.readthedocs.io/en/latest/ for more information on virtual xarray datasets.
Expand Down Expand Up @@ -87,9 +87,8 @@ def open_virtual_mfdataset(
Conventions: CF-1.7
title: Daily MUR SST, Final product
"""
import xarray as xr

import virtualizarr as vz
import xarray as xr

if access == "direct":
fs = earthaccess.get_s3_filesystem(results=granules[0])
Expand All @@ -104,7 +103,7 @@ def open_virtual_mfdataset(
if preprocess is not None:
preprocess = dask.delayed(preprocess) # type: ignore
else:
open_ = vz.open_virtual_dataset
open_ = vz.open_virtual_dataset # type: ignore
vdatasets = []
# Get list of virtual datasets (or dask delayed objects)
for g in granules:
Expand Down Expand Up @@ -149,7 +148,7 @@ def open_virtual_dataset(
access: str = "indirect",
load: bool = False,
) -> xr.Dataset:
"""Open a granule as a single virtual xarray Dataset.
"""Open a granule as a single virtual xarray Dataset. WARNING: This feature is current experimental and may change in the future. This feature relies on dmr++ metadata files which may not always be present for your dataset.
Uses DMR++ metadata files to create a virtual xarray dataset with ManifestArrays. This virtual dataset can be used to create zarr reference files. See https://virtualizarr.readthedocs.io/en/latest/ for more information on virtual xarray datasets.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ kerchunk = [
"xarray",
]
virtualizarr = [
"virtualizarr @ git+https://github.com/zarr-developers/VirtualiZarr.git"
"virtualizarr"
]
dev = [
"bump-my-version >=0.10.0",
Expand Down

0 comments on commit 760f340

Please sign in to comment.