Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feature/group-setitem
  • Loading branch information
jhamman committed Oct 23, 2024
2 parents ed67cc3 + bc588a7 commit 6e8f3da
Show file tree
Hide file tree
Showing 67 changed files with 993 additions and 396 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

34 changes: 33 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12']
python-version: ['3.11', '3.12', '3.13']
numpy-version: ['1.25', '1.26', '2.0']
dependency-set: ["minimal", "optional"]

Expand All @@ -43,3 +43,35 @@ jobs:
- name: Run Tests
run: |
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run
test-upstream-and-min-deps:
name: py=${{ matrix.python-version }}-${{ matrix.dependency-set }}

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', "3.13"]
dependency-set: ["upstream", "min_deps"]
exclude:
- python-version: "3.13"
dependency-set: min_deps
- python-version: "3.11"
dependency-set: upstream
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Hatch
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Set Up Hatch Env
run: |
hatch env create ${{ matrix.dependency-set }}
hatch env run -e ${{ matrix.dependency-set }} list-env
- name: Run Tests
run: |
hatch env run --env ${{ matrix.dependency-set }} run
4 changes: 0 additions & 4 deletions .pep8speaks.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.0
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand All @@ -22,7 +22,7 @@ repos:
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.12.1
hooks:
- id: mypy
files: src|tests
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ that implements the `AbstractFileSystem` API,
.. code-block:: python
>>> import zarr
>>> store = zarr.storage.RemoteStore("gs://foo/bar", mode="r")
>>> store = zarr.storage.RemoteStore.from_url("gs://foo/bar", mode="r")
>>> zarr.open(store=store)
<Array <RemoteStore(GCSFileSystem, foo/bar)> shape=(10, 20) dtype=float32>
Expand Down
127 changes: 101 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,23 @@ maintainers = [
{ name = "Juan Nunez-Iglesias", email = "[email protected]" },
{ name = "Martin Durant", email = "[email protected]" },
{ name = "Norman Rzepka" },
{ name = "Ryan Abernathey" }
{ name = "Ryan Abernathey" },
{ name = "David Stansby" },
{ name = "Tom Augspurger", email = "[email protected]" },
{ name = "Deepak Cherian" }
]
requires-python = ">=3.11"
# If you add a new dependency here, please also add it to .pre-commit-config.yml
dependencies = [
'asciitree',
'numpy>=1.25',
'numcodecs>=0.10.2',
'fsspec>2024',
'crc32c',
'typing_extensions',
'donfig',
'numcodecs>=0.13',
'fsspec>=2022.10.0',
'crc32c>=2.3',
'typing_extensions>=4.6',
'donfig>=0.8',
]

dynamic = [
"version",
]
Expand All @@ -46,6 +50,7 @@ classifiers = [
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
license = {text = "MIT License"}
keywords = ["Python", "compressed", "ndimensional-arrays", "zarr"]
Expand Down Expand Up @@ -94,7 +99,7 @@ extra = [
]
optional = [
'lmdb',
'universal-pathlib',
'universal-pathlib>=0.0.22',
]

[project.urls]
Expand Down Expand Up @@ -129,17 +134,17 @@ dependencies = [
features = ["test", "extra"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12"]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "1.26", "2.0"]
version = ["minimal"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12"]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "1.26", "2.0"]
features = ["optional"]

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12"]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "1.26", "2.0"]
features = ["gpu"]

Expand All @@ -149,7 +154,7 @@ run-coverage-gpu = "pip install cupy-cuda12x && pytest -m gpu --cov-config=pypro
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"

[tool.hatch.envs.gputest]
Expand All @@ -160,7 +165,7 @@ dependencies = [
features = ["test", "extra", "gpu"]

[[tool.hatch.envs.gputest.matrix]]
python = ["3.11", "3.12"]
python = ["3.11", "3.12", "3.13"]
numpy = ["1.25", "1.26", "2.0"]
version = ["minimal"]

Expand All @@ -169,7 +174,7 @@ run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=tests"
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/v3/test_properties.py tests/v3/test_store/test_stateful*"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"

[tool.hatch.envs.docs]
Expand All @@ -179,6 +184,65 @@ features = ['docs']
build = "cd docs && make html"
serve = "sphinx-autobuild docs docs/_build --host 0.0.0.0"

[tool.hatch.envs.upstream]
python = "3.13"
dependencies = [
'numpy', # from scientific-python-nightly-wheels
'numcodecs @ git+https://github.com/zarr-developers/numcodecs',
'fsspec @ git+https://github.com/fsspec/filesystem_spec',
's3fs @ git+https://github.com/fsspec/s3fs',
'universal_pathlib @ git+https://github.com/fsspec/universal_pathlib',
'crc32c @ git+https://github.com/ICRAR/crc32c',
'typing_extensions @ git+https://github.com/python/typing_extensions',
'donfig @ git+https://github.com/pytroll/donfig',
# test deps
'hypothesis',
'pytest',
'pytest-cov',
'pytest-asyncio',
'moto[s3]',
]

[tool.hatch.envs.upstream.env-vars]
PIP_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/"
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"
PIP_PRE = "1"

[tool.hatch.envs.upstream.scripts]
run = "pytest --verbose"
run-mypy = "mypy src"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"

[tool.hatch.envs.min_deps]
description = """Test environment for minimum supported dependencies
See Spec 0000 for details and drop schedule: https://scientific-python.org/specs/spec-0000/
"""
python = "3.11"
dependencies = [
'numpy==1.25.*',
'numcodecs==0.13.*', # 0.13 needed for? (should be 0.11)
'fsspec==2022.10.0',
's3fs==2022.10.0',
'universal_pathlib==0.0.22',
'crc32c==2.3.*',
'typing_extensions==4.6.*', # 4.5 needed for @deprecated, 4.6 for Buffer
'donfig==0.8.*',
# test deps
'hypothesis',
'pytest',
'pytest-cov',
'pytest-asyncio',
'moto[s3]',
]

[tool.hatch.envs.min_deps.scripts]
run = "pytest --verbose"
run-hypothesis = "pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
list-env = "pip list"


[tool.ruff]
line-length = 100
force-exclude = true
Expand Down Expand Up @@ -210,6 +274,7 @@ extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
Expand Down Expand Up @@ -278,18 +343,17 @@ ignore_errors = true

[[tool.mypy.overrides]]
module = [
"tests.v2.*",
"tests.v3.package_with_entrypoint.*",
"tests.v3.test_codecs.test_codecs",
"tests.v3.test_codecs.test_transpose",
"tests.v3.test_metadata.*",
"tests.v3.test_store.*",
"tests.v3.test_config",
"tests.v3.test_group",
"tests.v3.test_indexing",
"tests.v3.test_properties",
"tests.v3.test_sync",
"tests.v3.test_v2",
"tests.package_with_entrypoint.*",
"tests.test_codecs.test_codecs",
"tests.test_codecs.test_transpose",
"tests.test_metadata.*",
"tests.test_store.*",
"tests.test_config",
"tests.test_group",
"tests.test_indexing",
"tests.test_properties",
"tests.test_sync",
"tests.test_v2",
]
ignore_errors = true

Expand Down Expand Up @@ -326,4 +390,15 @@ ignore = [

[tool.numpydoc_validation]
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
checks = ["GL06", "GL07", "GL10", "PR03", "PR05", "PR06"]
checks = [
"GL06",
"GL07",
"GL09",
"GL10",
"SS02",
"SS04",
"PR02",
"PR03",
"PR05",
"PR06",
]
Loading

0 comments on commit 6e8f3da

Please sign in to comment.