Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move v3/tests to tests #2396

Merged
merged 23 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0edc39b
move v3/tests to tests and fix various mypy issues
d-v-b Oct 17, 2024
b9fca09
test(ci): change branch name in v3 workflows (#2368)
jhamman Oct 15, 2024
0172dd6
Use lazy % formatting in logging functions (#2366)
DimitriPapadopoulos Oct 15, 2024
f76f3a3
Move roadmap and v3-design documument to docs (#2354)
jhamman Oct 15, 2024
c68c819
Multiple imports for an import name (#2367)
DimitriPapadopoulos Oct 15, 2024
74f4a9e
Enforce ruff/pycodestyle warnings (W) (#2369)
DimitriPapadopoulos Oct 15, 2024
39e68aa
Apply ruff/pycodestyle preview rule E262 (#2370)
DimitriPapadopoulos Oct 15, 2024
fc96b91
Fix typo (#2382)
DimitriPapadopoulos Oct 15, 2024
9a9c989
Imported name is not used anywhere in the module (#2379)
DimitriPapadopoulos Oct 15, 2024
df4ab1b
Missing mandatory keyword argument `shape` (#2376)
DimitriPapadopoulos Oct 15, 2024
568853f
Update ruff rules to ignore (#2374)
DimitriPapadopoulos Oct 15, 2024
3f676ff
Docstrings for arraymodule (#2276)
e-marshall Oct 15, 2024
59350df
fix/normalize storage paths (#2384)
d-v-b Oct 16, 2024
7837e2e
Enforce ruff/flake8-pyi rule PYI013 (#2389)
DimitriPapadopoulos Oct 17, 2024
cffced1
deps: remove fasteners from list of dependencies (#2386)
jhamman Oct 17, 2024
0b3aee6
Enforce ruff/flake8-annotations rule ANN003 (#2388)
DimitriPapadopoulos Oct 17, 2024
56c6a6b
Enforce ruff/Perflint rules (PERF) (#2372)
DimitriPapadopoulos Oct 17, 2024
bd96afb
chore: update package maintainers (#2387)
jhamman Oct 17, 2024
c8c7889
Fixed consolidated Group getitem with multi-part key (#2363)
TomAugspurger Oct 17, 2024
d1f481a
chore: add python 3.13 to ci / pyproject.toml (#2385)
jhamman Oct 17, 2024
3eec39b
Merge branch 'main' of github.com:zarr-developers/zarr-python into re…
d-v-b Oct 18, 2024
605a3a6
remove references to dead test dir in pyproject.toml
d-v-b Oct 18, 2024
5052ad3
remove v3 reference in test
d-v-b Oct 18, 2024
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
27 changes: 13 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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 @@ -173,7 +173,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 Down Expand Up @@ -282,18 +282,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
17 changes: 13 additions & 4 deletions src/zarr/testing/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, cast
from collections.abc import Callable, Coroutine
from typing import TYPE_CHECKING, Any, TypeVar, cast

import pytest

Expand Down Expand Up @@ -37,8 +38,16 @@ def has_cupy() -> bool:
return False


T_Callable = TypeVar("T_Callable", bound=Callable[[], Coroutine[Any, Any, None]])


# Decorator for GPU tests
def gpu_test(func: Any) -> Any:
return pytest.mark.gpu(
pytest.mark.skipif(not has_cupy(), reason="CuPy not installed or no GPU available")(func)
def gpu_test(func: T_Callable) -> T_Callable:
return cast(
T_Callable,
pytest.mark.gpu(
pytest.mark.skipif(not has_cupy(), reason="CuPy not installed or no GPU available")(
func
)
),
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/v3/test_config.py → tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MockClass:

assert (
fully_qualified_name(MockClass)
== "tests.v3.test_config.test_fully_qualified_name.<locals>.MockClass"
== "tests.test_config.test_fully_qualified_name.<locals>.MockClass"
)


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed tests/v3/test_store/__init__.py
Empty file.