Skip to content

Commit 30383a4

Browse files
committed
Merge branch 'main' of https://github.com/zarr-developers/zarr-python into deps/optional-fsspec
2 parents ccc0f1f + fd688c4 commit 30383a4

File tree

9 files changed

+505
-477
lines changed

9 files changed

+505
-477
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,22 @@ jobs:
9393
- name: Run Tests
9494
run: |
9595
hatch env run --env ${{ matrix.dependency-set }} run
96+
97+
test-complete:
98+
name: Test complete
99+
100+
needs:
101+
[
102+
test,
103+
test-upstream-and-min-deps,
104+
]
105+
if: always()
106+
runs-on: ubuntu-latest
107+
steps:
108+
- name: Check failure
109+
if: |
110+
contains(needs.*.result, 'failure') ||
111+
contains(needs.*.result, 'cancelled')
112+
run: exit 1
113+
- name: Success
114+
run: echo Success!

docs/contributing.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ the following::
9292
$ mkdir -p ~/pyenv/zarr-dev
9393
$ python -m venv ~/pyenv/zarr-dev
9494
$ source ~/pyenv/zarr-dev/bin/activate
95-
$ pip install -r requirements_dev_minimal.txt -r requirements_dev_numpy.txt
96-
$ pip install -e .[docs]
95+
$ pip install -e .[test,docs]
9796

9897
To verify that your development environment is working, you can run the unit tests::
9998

100-
$ python -m pytest -v zarr
99+
$ python -m pytest -v tests
101100

102101
Creating a branch
103102
~~~~~~~~~~~~~~~~~
@@ -149,7 +148,7 @@ and invoke::
149148
Some tests require optional dependencies to be installed, otherwise
150149
the tests will be skipped. To install all optional dependencies, run::
151150

152-
$ pip install -r requirements_dev_optional.txt
151+
$ pip install pytest-doctestplus
153152

154153
To also run the doctests within docstrings (requires optional
155154
dependencies to be installed), run::
@@ -234,7 +233,7 @@ should run and pass as doctests under Python 3.8. To run doctests,
234233
activate your development environment, install optional requirements,
235234
and run::
236235

237-
$ python -m pytest -v --doctest-plus zarr
236+
$ python -m pytest -v --doctest-plus tests
238237

239238
Zarr uses Sphinx for documentation, hosted on readthedocs.org. Documentation is
240239
written in the RestructuredText markup language (.rst files) in the ``docs`` folder.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ ignore_errors = true
341341

342342
[[tool.mypy.overrides]]
343343
module = [
344+
"zarr.testing.stateful", # lots of hypothesis decorator errors
344345
"tests.package_with_entrypoint.*",
345346
"tests.test_codecs.test_codecs",
346347
"tests.test_codecs.test_transpose",

src/zarr/core/chunk_grids.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ def normalize_chunks(chunks: Any, shape: tuple[int, ...], typesize: int) -> tupl
138138
s if c == -1 or c is None else int(c) for s, c in zip(shape, chunks, strict=False)
139139
)
140140

141+
if not all(isinstance(c, numbers.Integral) for c in chunks):
142+
raise TypeError("non integer value in chunks")
143+
141144
return tuple(int(c) for c in chunks)
142145

143146

0 commit comments

Comments
 (0)