Skip to content

Commit

Permalink
Add test matrix for V3 (#1656)
Browse files Browse the repository at this point in the history
* Add a test matrix for Zarr V3

* Run mypy in test matrix

* Simplify matrix

* Update .github/workflows/test-v3.yml

Co-authored-by: Joe Hamman <[email protected]>

---------

Co-authored-by: Joe Hamman <[email protected]>
  • Loading branch information
maxrjones and jhamman authored Feb 12, 2024
1 parent c69ac31 commit c578963
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ jobs:
hatch env create
- name: Run Tests
run: |
hatch run test:run
hatch run test:run
- name: Run mypy
continue-on-error: true
run: |
hatch run test:run-mypy
31 changes: 24 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ docs = [
'numpydoc',
'numcodecs[msgpack]',
]
extra = [
'attrs',
'cattrs',
'msgpack',
'crc32c',
'zstandard'
]
optional = [
'lmdb',
]

[project.urls]
"Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues"
Expand All @@ -79,22 +89,29 @@ build.hooks.vcs.version-file = "src/zarr/_version.py"

[tool.hatch.envs.test]
extra-dependencies = [
"attrs",
"cattrs",
"coverage",
"pytest",
"pytest-cov",
"msgpack",
"lmdb",
"zstandard",
"crc32c",
"pytest-asyncio"
"pytest-asyncio",
"mypy",
]
features = ["extra"]

[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11"]
numpy = ["1.24", "1.26"]
version = ["minimal"]

[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11"]
numpy = ["1.24", "1.26"]
features = ["optional"]

[tool.hatch.envs.test.scripts]
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"

[tool.hatch.envs.docs]
features = ['docs']
Expand Down

0 comments on commit c578963

Please sign in to comment.