Skip to content

deps: pin array-api-strict<2.4 #346

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

Merged
merged 1 commit into from
Jul 1, 2025
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 pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,42 +61,42 @@ mypy = ">=1.16.1"
basedpyright = ">=1.29.4"
numpydoc = ">=1.8.0,<2"
# import dependencies for mypy:
array-api-strict = ">=2.3.1"
array-api-strict = ">=2.3.1,<2.4"
numpy = ">=2.1.3"
pytest = ">=8.4.0"
hypothesis = ">=6.131.28"
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
# NOTE: don't add cupy, jax, pytorch, or sparse here,
# as they slow down mypy and are not portable across target OSs

[tool.pixi.feature.lint.tasks]
pre-commit-install = { cmd = "pre-commit install", description = "Install pre-commit"}
pre-commit = { cmd = "pre-commit run --all-files", description = "Run pre-commit"}
mypy = { cmd = "mypy", description="Type check with mypy"}
pylint = { cmd = "pylint array_api_extra", cwd = "src" , description = "Lint using pylint"}
pyright = { cmd = "basedpyright", description = "Type check with basedpyright"}
lint = { depends-on = ["pre-commit", "pylint", "mypy", "pyright"] , description = "Run pre-commit, pylint, mypy, and pyright"}
pre-commit-install = { cmd = "pre-commit install", description = "Install pre-commit" }
pre-commit = { cmd = "pre-commit run --all-files", description = "Run pre-commit" }
mypy = { cmd = "mypy", description = "Type check with mypy" }
pylint = { cmd = "pylint array_api_extra", cwd = "src", description = "Lint using pylint" }
pyright = { cmd = "basedpyright", description = "Type check with basedpyright" }
lint = { depends-on = ["pre-commit", "pylint", "mypy", "pyright"], description = "Run pre-commit, pylint, mypy, and pyright" }

[tool.pixi.feature.tests.dependencies]
pytest = ">=8.4.0"
pytest-cov = ">=6.2.1"
hypothesis = ">=6.131.28"
array-api-strict = ">=2.3.1"
array-api-strict = ">=2.3.1,<2.4"
numpy = ">=1.22.0"

[tool.pixi.feature.tests.tasks]
tests = { cmd = "pytest -v", description = "Run tests"}
tests-cov = { cmd="pytest -v -ra --cov --cov-report=xml --cov-report=term --durations=20", description = "Run tests with coverage"}
tests = { cmd = "pytest -v", description = "Run tests" }
tests-cov = { cmd = "pytest -v -ra --cov --cov-report=xml --cov-report=term --durations=20", description = "Run tests with coverage" }

clean-vendor-compat = { cmd = "rm -rf vendor_tests/array_api_compat", description = "Delete the existing vendored version of array-api-compat"}
clean-vendor-extra = { cmd = "rm -rf vendor_tests/array_api_extra" , description = "Delete the existing vendored version of array-api-extra"}
copy-vendor-compat = { cmd = "cp -r $(python -c 'import site; print(site.getsitepackages()[0])')/array_api_compat vendor_tests/", depends-on = ["clean-vendor-compat"] , description = "Vendor a clean copy of array-api-compat"}
copy-vendor-extra = { cmd = "cp -r src/array_api_extra vendor_tests/", depends-on = ["clean-vendor-extra"] , description = "Vendor a clean copy of array-api-extra"}
tests-vendor = { cmd = "pytest -v vendor_tests", depends-on = ["copy-vendor-compat", "copy-vendor-extra"] , description = "Check that array-api-extra and array-api-compat can be vendored together" }
clean-vendor-compat = { cmd = "rm -rf vendor_tests/array_api_compat", description = "Delete the existing vendored version of array-api-compat" }
clean-vendor-extra = { cmd = "rm -rf vendor_tests/array_api_extra", description = "Delete the existing vendored version of array-api-extra" }
copy-vendor-compat = { cmd = "cp -r $(python -c 'import site; print(site.getsitepackages()[0])')/array_api_compat vendor_tests/", depends-on = ["clean-vendor-compat"], description = "Vendor a clean copy of array-api-compat" }
copy-vendor-extra = { cmd = "cp -r src/array_api_extra vendor_tests/", depends-on = ["clean-vendor-extra"], description = "Vendor a clean copy of array-api-extra" }
tests-vendor = { cmd = "pytest -v vendor_tests", depends-on = ["copy-vendor-compat", "copy-vendor-extra"], description = "Check that array-api-extra and array-api-compat can be vendored together" }

tests-ci = { depends-on = ["tests-cov", "tests-vendor"] , description = "Run tests with coverage and vendor tests"}
coverage = { cmd = "coverage html", depends-on = ["tests-cov"], description = "Generate test coverage html report"}
open-coverage = { cmd = "open htmlcov/index.html", depends-on = ["coverage"] , description = "Open test coverage report"}
tests-ci = { depends-on = ["tests-cov", "tests-vendor"], description = "Run tests with coverage and vendor tests" }
coverage = { cmd = "coverage html", depends-on = ["tests-cov"], description = "Generate test coverage html report" }
open-coverage = { cmd = "open htmlcov/index.html", depends-on = ["coverage"], description = "Open test coverage report" }

[tool.pixi.feature.docs.dependencies]
sphinx = ">=7.4.7"
Expand All @@ -105,20 +105,20 @@ myst-parser = ">=4.0.1"
sphinx-copybutton = ">=0.5.2"
sphinx-autodoc-typehints = ">=1.25.3"
# Needed to import parsed modules with autodoc
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
pytest = ">=8.4.0"
typing-extensions = ">=4.14.0"
numpy = ">=2.1.3"

[tool.pixi.feature.docs.tasks]
docs = { cmd = "sphinx-build -E -W . build/", cwd = "docs" , description = "Build docs"}
open-docs = { cmd = "open build/index.html", cwd = "docs", depends-on = ["docs"] , description = "Open the generated docs"}
docs = { cmd = "sphinx-build -E -W . build/", cwd = "docs", description = "Build docs" }
open-docs = { cmd = "open build/index.html", cwd = "docs", depends-on = ["docs"], description = "Open the generated docs" }

[tool.pixi.feature.dev.dependencies]
ipython = ">=7.33.0"

[tool.pixi.feature.dev.tasks]
ipython = { cmd = "ipython" , description = "Launch ipython"}
ipython = { cmd = "ipython", description = "Launch ipython" }

[tool.pixi.feature.py310.dependencies]
python = "~=3.10.0"
Expand All @@ -135,7 +135,7 @@ numpy = "=1.22.0"
# Note: JAX and PyTorch will install CPU variants.
[tool.pixi.feature.backends.dependencies]
pytorch = ">=2.7.0"
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
sparse = ">=0.17.0"

[tool.pixi.feature.backends.target.linux-64.dependencies]
Expand Down Expand Up @@ -184,7 +184,7 @@ python-freethreading = "~=3.13.0"
pytest-run-parallel = ">=0.4.4"
numpy = ">=2.3.0"
# pytorch = "*" # Not available on Python 3.13t yet
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
dask-core = ">=2025.5.1" # No distributed, tornado, etc.
# sparse = "*" # numba not available on Python 3.13t yet
# jax = "*" # ml_dtypes not available on Python 3.13t yet

Expand Down Expand Up @@ -245,7 +245,7 @@ ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["tests/*"]
disable_error_code = ["no-untyped-def"] # test(...) without -> None
disable_error_code = ["no-untyped-def"] # test(...) without -> None

# pyright

Expand Down