Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into deps/optional-fsspec
  • Loading branch information
jhamman committed Dec 6, 2024
2 parents ccc0f1f + fd688c4 commit 30383a4
Show file tree
Hide file tree
Showing 9 changed files with 505 additions and 477 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,22 @@ jobs:
- name: Run Tests
run: |
hatch env run --env ${{ matrix.dependency-set }} run
test-complete:
name: Test complete

needs:
[
test,
test-upstream-and-min-deps,
]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check failure
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: exit 1
- name: Success
run: echo Success!
9 changes: 4 additions & 5 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ the following::
$ mkdir -p ~/pyenv/zarr-dev
$ python -m venv ~/pyenv/zarr-dev
$ source ~/pyenv/zarr-dev/bin/activate
$ pip install -r requirements_dev_minimal.txt -r requirements_dev_numpy.txt
$ pip install -e .[docs]
$ pip install -e .[test,docs]

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

$ python -m pytest -v zarr
$ python -m pytest -v tests

Creating a branch
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -149,7 +148,7 @@ and invoke::
Some tests require optional dependencies to be installed, otherwise
the tests will be skipped. To install all optional dependencies, run::

$ pip install -r requirements_dev_optional.txt
$ pip install pytest-doctestplus

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

$ python -m pytest -v --doctest-plus zarr
$ python -m pytest -v --doctest-plus tests

Zarr uses Sphinx for documentation, hosted on readthedocs.org. Documentation is
written in the RestructuredText markup language (.rst files) in the ``docs`` folder.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ ignore_errors = true

[[tool.mypy.overrides]]
module = [
"zarr.testing.stateful", # lots of hypothesis decorator errors
"tests.package_with_entrypoint.*",
"tests.test_codecs.test_codecs",
"tests.test_codecs.test_transpose",
Expand Down
3 changes: 3 additions & 0 deletions src/zarr/core/chunk_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ def normalize_chunks(chunks: Any, shape: tuple[int, ...], typesize: int) -> tupl
s if c == -1 or c is None else int(c) for s, c in zip(shape, chunks, strict=False)
)

if not all(isinstance(c, numbers.Integral) for c in chunks):
raise TypeError("non integer value in chunks")

return tuple(int(c) for c in chunks)


Expand Down
Loading

0 comments on commit 30383a4

Please sign in to comment.