Skip to content

Commit 341c6a0

Browse files
committed
Re-enable lint in dev env
1 parent 2f4924e commit 341c6a0

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
environments: lint
3838
- name: Run Pylint, Mypy & Pyright
3939
run: |
40-
pixi run pylint
41-
pixi run mypy
42-
pixi run pyright
40+
pixi run -e lint pylint
41+
pixi run -e lint mypy
42+
pixi run -e lint pyright
4343
4444
checks:
4545
name: Check ${{ matrix.environment }}

docs/contributing.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pixi run pre-commit-install
106106
- To run the lint suite:
107107

108108
```
109-
pixi run lint
109+
pixi run -e lint lint
110110
```
111111

112112
- To enter an interactive Python prompt:
@@ -118,10 +118,10 @@ pixi run ipython
118118
- To run individual parts of the lint suite separately:
119119

120120
```
121-
pixi run pre-commit
122-
pixi run pylint
123-
pixi run mypy
124-
pixi run pyright
121+
pixi run -e lint pre-commit
122+
pixi run -e lint pylint
123+
pixi run -e lint mypy
124+
pixi run -e lint pyright
125125
```
126126

127127
Alternative environments are available with a subset of the dependencies and
@@ -130,5 +130,10 @@ tasks available in the `dev` environment:
130130
```
131131
pixi shell -e docs
132132
pixi shell -e tests
133+
pixi shell -e tests-backends
133134
pixi shell -e lint
134135
```
136+
137+
If you run on a host with CUDA hardware, you can enable extra tests:
138+
139+
pixi shell -e dev-cuda pixi shell -e tests-cuda pixi run -e tests-cuda tests

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: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ array-api-compat = ">=1.10.0,<2"
5353
[tool.pixi.pypi-dependencies]
5454
array-api-extra = { path = ".", editable = true }
5555

56-
# lint-env: pixi hack to composite the dev environment on top of lint
57-
# without being asked if you want to run lint tasks in dev
58-
[tool.pixi.feature.lint-env.dependencies]
56+
[tool.pixi.feature.lint.dependencies]
5957
pre-commit = "*"
6058
pylint = "*"
6159
basedmypy = "*"
@@ -154,11 +152,11 @@ cupy = "*"
154152

155153
[tool.pixi.environments]
156154
default = { solve-group = "default" }
157-
lint = { features = ["lint", "lint-env"], solve-group = "default" }
155+
lint = { features = ["lint"], solve-group = "default" }
158156
tests = { features = ["tests"], solve-group = "default" }
159157
docs = { features = ["docs"], solve-group = "default" }
160-
dev = { features = ["lint-env", "tests", "docs", "dev", "backends"], solve-group = "default" }
161-
dev-cuda = { features = ["lint-env", "tests", "docs", "dev", "backends", "cuda-backends"] }
158+
dev = { features = ["lint", "tests", "docs", "dev", "backends"], solve-group = "default" }
159+
dev-cuda = { features = ["lint", "tests", "docs", "dev", "backends", "cuda-backends"] }
162160
tests-py310 = ["py310", "tests"]
163161
tests-py313 = ["py313", "tests"]
164162
# CUDA not available on free github actions and on some developers' PCs

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def xp(library: Backend) -> ModuleType: # numpydoc ignore=PR01,RT03
107107
if library == Backend.JAX_NUMPY:
108108
import jax
109109

110-
jax.config.update("jax_enable_x64", True)
110+
# suppress unused-ignore to run mypy in -e lint as well as -e dev
111+
jax.config.update("jax_enable_x64", True) # type: ignore[no-untyped-call,unused-ignore]
111112

112113
# Possibly wrap module with array_api_compat
113114
return array_namespace(xp.empty(0))

0 commit comments

Comments
 (0)