diff --git a/pixi.lock b/pixi.lock index 105e58f..32a21e2 100644 --- a/pixi.lock +++ b/pixi.lock @@ -4196,7 +4196,7 @@ packages: - pypi: ./ name: array-api-extra version: 0.8.1.dev0 - sha256: 2f998a4b4fb32a961ab7097e7c4a9a6cb11ffcf47b702e53cb2649afef406005 + sha256: c77a8e8beae9d2d5dd0910b1bb0563574b908a6112e4ca67dcda5d4799d0bc70 requires_dist: - array-api-compat>=1.12.0,<2 requires_python: '>=3.10' diff --git a/pyproject.toml b/pyproject.toml index b2d7d6d..c5a9f4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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" @@ -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] @@ -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 @@ -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