Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: hatch run test.py3.11-2.0-minimal:pytest tests/benchmarks --codspeed
run: hatch run test.py3.11-minimal:pytest tests/benchmarks --codspeed
9 changes: 4 additions & 5 deletions .github/workflows/gpu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ concurrency:

jobs:
test:
name: py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }}
name: py=${{ matrix.python-version }}, deps=${{ matrix.dependency-set }}

runs-on: gpu-runner
strategy:
matrix:
python-version: ['3.11']
numpy-version: ['2.2']
dependency-set: ["minimal"]

steps:
Expand Down Expand Up @@ -61,11 +60,11 @@ jobs:
pip install hatch
- name: Set Up Hatch Env
run: |
hatch env create gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
hatch env run -e gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
hatch env create gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
hatch env run -e gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
- name: Run Tests
run: |
hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage-gpu
hatch env run --env gputest.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage-gpu

- name: Upload coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
python-version: ['3.12']
numpy-version: ['2.2']
dependency-set: ["optional"]

steps:
Expand All @@ -47,8 +46,8 @@ jobs:
pip install hatch
- name: Set Up Hatch Env
run: |
hatch env create test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- name: Restore cached hypothesis directory
id: restore-hypothesis-cache
Expand All @@ -64,7 +63,7 @@ jobs:
id: status
run: |
echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-hypothesis
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis

# explicitly save the cache so it gets updated, also do this even if it fails.
- name: Save cached hypothesis directory
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,27 @@ concurrency:

jobs:
test:
name: os=${{ matrix.os }}, py=${{ matrix.python-version }}, np=${{ matrix.numpy-version }}, deps=${{ matrix.dependency-set }}
name: os=${{ matrix.os }}, py=${{ matrix.python-version }}, deps=${{ matrix.dependency-set }}

strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
numpy-version: ['2.0', '2.2']
dependency-set: ["minimal", "optional"]
os: ["ubuntu-latest"]
include:
- python-version: '3.11'
numpy-version: '2.0'
dependency-set: 'optional'
os: 'macos-latest'

- python-version: '3.13'
numpy-version: '2.2'
dependency-set: 'optional'
os: 'macos-latest'

- python-version: '3.11'
numpy-version: '2.0'
dependency-set: 'optional'
os: 'windows-latest'

- python-version: '3.13'
numpy-version: '2.2'
dependency-set: 'optional'
os: 'windows-latest'
runs-on: ${{ matrix.os }}
Expand All @@ -58,13 +56,13 @@ jobs:
pip install hatch
- name: Set Up Hatch Env
run: |
hatch env create test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }}
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} list-env
hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
- name: Run Tests
env:
HYPOTHESIS_PROFILE: ci
run: |
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.numpy-version }}-${{ matrix.dependency-set }} run-coverage
hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-coverage
- name: Upload coverage
if: ${{ matrix.dependency-set == 'optional' && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v5
Expand Down Expand Up @@ -152,4 +150,4 @@ jobs:
contains(needs.*.result, 'cancelled')
run: exit 1
- name: Success
run: echo Success!
run: echo Success!
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ version.source = "vcs"
hooks.vcs.version-file = "src/zarr/_version.py"

[tool.hatch.envs.test]
dependencies = [
"numpy~={matrix:numpy}",
]
features = ["test"]

[tool.hatch.envs.test.env-vars]
Expand All @@ -165,7 +162,6 @@ COV_CORE_DATAFILE = ".coverage.eager"

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]
numpy = ["2.0", "2.2"]
deps = ["minimal", "optional"]

[tool.hatch.envs.test.overrides]
Expand All @@ -188,14 +184,12 @@ list-env = "pip list"
[tool.hatch.envs.gputest]
template = "test"
dependencies = [
"numpy~={matrix:numpy}",
"universal_pathlib",
]
features = ["test", "gpu"]

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

[tool.hatch.envs.gputest.scripts]
Expand Down