Skip to content

Commit cf293eb

Browse files
committed
DEV: add Pixi task descriptions
1 parent 06c4308 commit cf293eb

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

Diff for: pixi.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+19-19
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ dask-core = ">=2025.3.0" # No distributed, tornado, etc.
7070
# as they slow down mypy and are not portable across target OSs
7171

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

8080
[tool.pixi.feature.tests.dependencies]
8181
pytest = ">=8.3.5"
@@ -85,18 +85,18 @@ array-api-strict = ">=2.3.1"
8585
numpy = ">=1.22.0"
8686

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

91-
clean-vendor-compat = "rm -rf vendor_tests/array_api_compat"
92-
clean-vendor-extra = "rm -rf vendor_tests/array_api_extra"
93-
copy-vendor-compat = { cmd = "cp -r $(python -c 'import site; print(site.getsitepackages()[0])')/array_api_compat vendor_tests/", depends-on = ["clean-vendor-compat"] }
94-
copy-vendor-extra = { cmd = "cp -r src/array_api_extra vendor_tests/", depends-on = ["clean-vendor-extra"] }
95-
tests-vendor = { cmd = "pytest -v vendor_tests", depends-on = ["copy-vendor-compat", "copy-vendor-extra"] }
91+
clean-vendor-compat = { cmd = "rm -rf vendor_tests/array_api_compat", description = "Delete the existing vendored version of array-api-compat"}
92+
clean-vendor-extra = { cmd = "rm -rf vendor_tests/array_api_extra" , description = "Delete the existing vendored version of array-api-extra"}
93+
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"}
94+
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"}
95+
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" }
9696

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

101101
[tool.pixi.feature.docs.dependencies]
102102
sphinx = ">=7.4.7"
@@ -111,14 +111,14 @@ typing-extensions = ">=4.13.1"
111111
numpy = ">=2.1.3"
112112

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

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

120120
[tool.pixi.feature.dev.tasks]
121-
ipython = { cmd = "ipython" }
121+
ipython = { cmd = "ipython" , description = "Launch ipython"}
122122

123123
[tool.pixi.feature.py310.dependencies]
124124
python = "~=3.10.0"

0 commit comments

Comments
 (0)