Skip to content

Commit

Permalink
Merge pull request #454 from martindurant/zarr_opts
Browse files Browse the repository at this point in the history
Infer storage_options in zarr, if given mapper
  • Loading branch information
martindurant authored May 3, 2024
2 parents dee5938 + 47f2116 commit 1d77a1a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [39, 310, 311]
python-version: [310, 311, 312]

steps:
- uses: actions/checkout@v4
- name: Setup conda
uses: mamba-org/setup-micromamba@v1
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: ci/environment-py${{matrix.python-version}}.yml
cache-downloads: false
cache-environment: true
generate-run-shell: false
- name: Install kerchunk
shell: bash -l {0}
run: |
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include LICENSE

prune tests
prune examples
global-exclude *.hdf *.hdf5 *.h5 *.grib2 *.tiff *.tif *.json test*.py
4 changes: 2 additions & 2 deletions ci/environment-py39.yml → ci/environment-py312.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- python=3.12
- dask
- zarr
- xarray
- xarray-datatree
- h5netcdf
- h5py<3.9
- h5py
- pandas
- cfgrib
- cftime
Expand Down
2 changes: 1 addition & 1 deletion kerchunk/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def _replace(l: list, i: int, v) -> list:

def auto_dask(
urls: List[str],
single_driver: str,
single_driver: type,
single_kwargs: dict,
mzz_kwargs: dict,
n_batches: int,
Expand Down
2 changes: 2 additions & 0 deletions kerchunk/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def single_zarr(
mapper = fsspec.get_mapper(uri_or_store, **(storage_options or {}))
else:
mapper = uri_or_store
if isinstance(mapper, fsspec.FSMap) and storage_options is None:
storage_options = mapper.fs.storage_options

refs = out or {}
for k in mapper:
Expand Down

0 comments on commit 1d77a1a

Please sign in to comment.