Skip to content

Commit 013884e

Browse files
committed
Merge branch 'main' into at
2 parents f5c3016 + 4d5a85c commit 013884e

File tree

5 files changed

+22
-72
lines changed

5 files changed

+22
-72
lines changed

.github/workflows/test-vendor.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

pixi.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ numpy = "*"
8484
pytest = "*"
8585

8686
[tool.pixi.feature.lint.tasks]
87-
pre-commit-install = { cmd = "pre-commit install" }
88-
pre-commit = { cmd = "pre-commit run --all-files" }
89-
mypy = { cmd = "mypy", cwd = "." }
90-
pylint = { cmd = ["pylint", "array_api_extra"], cwd = "src" }
91-
pyright = { cmd = "basedpyright", cwd = "." }
87+
pre-commit-install = "pre-commit install"
88+
pre-commit = "pre-commit run --all-files"
89+
mypy = "mypy"
90+
pylint = { cmd = "pylint array_api_extra", cwd = "src" }
91+
pyright = "basedpyright"
9292
lint = { depends-on = ["pre-commit", "pylint", "mypy", "pyright"] }
9393

9494
[tool.pixi.feature.tests.dependencies]
@@ -98,11 +98,18 @@ array-api-strict = "*"
9898
numpy = "*"
9999

100100
[tool.pixi.feature.tests.tasks]
101-
tests = { cmd = "pytest -v" }
102-
tests-ci = { cmd = "pytest -v -ra --cov --cov-report=xml --cov-report=term --durations=20" }
103-
tests-vendor = { cmd = "pytest vendor_tests" }
104-
coverage = { cmd = ["coverage", "html"], depends-on = ["tests-ci"] }
105-
open-coverage = { cmd = ["open", "htmlcov/index.html"], depends-on = ["coverage"] }
101+
tests = "pytest -v"
102+
tests-cov = "pytest -v -ra --cov --cov-report=xml --cov-report=term --durations=20"
103+
104+
clean-vendor-compat = "rm -rf vendor_tests/array_api_compat"
105+
clean-vendor-extra = "rm -rf vendor_tests/array_api_extra"
106+
copy-vendor-compat = { cmd = "cp -r $(python -c 'import site; print(site.getsitepackages()[0])')/array_api_compat vendor_tests/", depends-on = ["clean-vendor-compat"] }
107+
copy-vendor-extra = { cmd = "cp -r src/array_api_extra vendor_tests/", depends-on = ["clean-vendor-extra"] }
108+
tests-vendor = { cmd = "pytest -v vendor_tests", depends-on = ["copy-vendor-compat", "copy-vendor-extra"] }
109+
110+
tests-ci = { depends-on = ["tests-cov", "tests-vendor"] }
111+
coverage = { cmd = "coverage html", depends-on = ["tests-cov"] }
112+
open-coverage = { cmd = "open htmlcov/index.html", depends-on = ["coverage"] }
106113

107114
[tool.pixi.feature.docs.dependencies]
108115
sphinx = ">=7.0"
@@ -112,8 +119,8 @@ sphinx-copybutton = "*"
112119
sphinx-autodoc-typehints = "*"
113120

114121
[tool.pixi.feature.docs.tasks]
115-
docs = { cmd = ["sphinx-build", ".", "build/"], cwd = "docs" }
116-
open-docs = { cmd = ["open", "build/index.html"], cwd = "docs", depends-on = ["docs"] }
122+
docs = { cmd = "sphinx-build . build/", cwd = "docs" }
123+
open-docs = { cmd = "open build/index.html", cwd = "docs", depends-on = ["docs"] }
117124

118125
[tool.pixi.feature.dev.dependencies]
119126
ipython = "*"

src/array_api_extra/_lib/__init__.py

Whitespace-only changes.

src/array_api_extra/_lib/_compat.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ from types import ModuleType
22

33
from ._typing import Array, Device
44

5+
# pylint: disable=missing-class-docstring,unused-argument
6+
57
class ArrayModule(ModuleType):
68
def device(self, x: Array, /) -> Device: ...
79

0 commit comments

Comments
 (0)