|
1 |
| -isolated_build = true |
2 |
| -env_list = ["repo-review", "pre-commit", "3.10", "3.11", "3.12", "3.13"] |
| 1 | +min_version = "4" |
| 2 | +requires = ["tox-uv>=1"] |
| 3 | +env_list = ["lint", "pyright", "mypy", "3.13", "3.12", "3.11", "3.10"] |
3 | 4 |
|
4 | 5 | [env_run_base]
|
5 |
| -runner = "uv-venv-lock-runner" |
6 | 6 | description = "stubtest with {base_python}"
|
7 |
| -allowlist_externals = ["poe"] |
8 |
| -commands = [["poe", "stubtest"]] |
| 7 | +runner = "uv-venv-lock-runner" |
| 8 | +dependency_groups = ["type"] |
| 9 | +uv_sync_flags = ["--no-editable"] |
| 10 | +commands = [ |
| 11 | + [ |
| 12 | + "stubtest", |
| 13 | + "--ignore-unused-allowlist", |
| 14 | + "--allowlist=.mypyignore", |
| 15 | + "--mypy-config-file=pyproject.toml", |
| 16 | + "--concise", |
| 17 | + {replace = "posargs", default = ["scipy"], extend = true}, |
| 18 | + ], |
| 19 | +] |
9 | 20 |
|
10 | 21 | [env.pre-commit]
|
11 |
| -runner = "uv-venv-lock-runner" |
12 | 22 | description = "pre-commit"
|
13 |
| -allowlist_externals = ["poe"] |
14 |
| -commands = [["poe", "pre-commit"]] |
15 |
| - |
16 |
| -[env.repo-review] |
17 |
| -runner = "uv-venv-lock-runner" |
18 |
| -description = "repo-review" |
19 |
| -allowlist_externals = ["poe"] |
20 |
| -commands = [["poe", "repo-review"]] |
| 23 | +skip_install = true |
| 24 | +deps = ["pre-commit-uv>=4.1.4"] |
| 25 | +allowlist_externals = ["pre-commit"] |
| 26 | +commands = [["pre-commit", "run", "--all-files"]] |
21 | 27 |
|
22 | 28 | [env.lint]
|
23 | 29 | description = "lint"
|
| 30 | +runner = "uv-venv-lock-runner" |
24 | 31 | dependency_groups = ["lint"]
|
25 | 32 | commands = [
|
26 |
| - [ |
27 |
| - "ruff", |
28 |
| - "format", |
29 |
| - "--check", |
30 |
| - ], |
31 |
| - [ |
32 |
| - "ruff", |
33 |
| - "check", |
34 |
| - "--show-fixes", |
35 |
| - ], |
36 |
| - [ |
37 |
| - "mdformat", |
38 |
| - "--check", |
39 |
| - "CODE_OF_CONDUCT.md", |
40 |
| - "CONTRIBUTING.md", |
41 |
| - "README.md", |
42 |
| - "SECURITY.md", |
43 |
| - "tests/README.md", |
44 |
| - "codegen/README.md", |
45 |
| - ], |
46 |
| - [ |
47 |
| - "repo-review", |
48 |
| - ".", |
49 |
| - ], |
50 |
| -] |
51 |
| - |
52 |
| -[env.basedmypy] |
53 |
| -description = "basedmypy" |
54 |
| -dependency_groups = ["typecheck"] |
55 |
| -commands = [ |
56 |
| - [ |
57 |
| - "uv", |
58 |
| - "pip", |
59 |
| - "freeze", |
60 |
| - ], |
61 |
| - [ |
62 |
| - "uv", |
63 |
| - "run", |
64 |
| - "--frozen", |
65 |
| - "--no-editable", |
66 |
| - "--isolated", |
67 |
| - "--refresh-package=scipy-stubs", |
68 |
| - "mypy", |
69 |
| - "--config-file=pyproject.toml", |
70 |
| - "scipy-stubs", |
71 |
| - "codegen", |
72 |
| - ], |
| 33 | + ["repo-review", "."], |
| 34 | + ["ruff", "check", "--show-fixes"], |
| 35 | + ["ruff", "format", "--check"], |
73 | 36 | ]
|
74 | 37 |
|
75 |
| -[env.basedpyright] |
| 38 | +[env.pyright] |
76 | 39 | description = "basedpyright"
|
77 |
| -dependency_groups = ["typecheck"] |
78 |
| -commands = [["uv", "pip", "freeze"], ["basedpyright", "scipy-stubs", "codegen"]] |
79 |
| - |
80 |
| -[env.min-versions-test] |
81 |
| -description = "min versions tests" |
82 |
| -dependency_groups = ["typecheck"] |
83 |
| -commands = [["python", "--version"], ["uv", "pip", "show", "numpy"]] |
84 |
| - |
85 |
| -[env.basedmypy-tests] |
86 |
| -description = "basedmypy tests" |
87 |
| -dependency_groups = ["typecheck"] |
88 |
| -commands = [ |
89 |
| - [ |
90 |
| - "uv", |
91 |
| - "pip", |
92 |
| - "freeze", |
93 |
| - ], |
94 |
| - [ |
95 |
| - "uv", |
96 |
| - "run", |
97 |
| - "--frozen", |
98 |
| - "--no-editable", |
99 |
| - "--isolated", |
100 |
| - "--refresh-package=scipy-stubs", |
101 |
| - "mypy", |
102 |
| - "--config-file=pyproject.toml", |
103 |
| - "scipy-stubs", |
104 |
| - "codegen", |
105 |
| - ], |
106 |
| -] |
107 |
| - |
108 |
| -[env.basedpyright-tests] |
109 |
| -description = "basedpyright tests" |
110 |
| -dependency_groups = ["typecheck"] |
111 |
| -commands = [["uv", "pip", "freeze"], ["basedpyright", "tests"]] |
112 |
| - |
113 |
| -[env.stubtest] |
114 |
| -description = "stubtest" |
115 |
| -dependency_groups = ["typecheck"] |
116 |
| -commands = [ |
117 |
| - [ |
118 |
| - "uv", |
119 |
| - "pip", |
120 |
| - "freeze", |
121 |
| - ], |
122 |
| - [ |
123 |
| - "uv", |
124 |
| - "run", |
125 |
| - "--frozen", |
126 |
| - "--no-editable", |
127 |
| - "--isolated", |
128 |
| - "--refresh-package=scipy-stubs", |
129 |
| - "stubtest", |
130 |
| - "--mypy-config-file=pyproject.toml", |
131 |
| - "--allowlist=.mypyignore", |
132 |
| - "--ignore-unused-allowlist", |
133 |
| - "scipy", |
134 |
| - ], |
135 |
| -] |
| 40 | +runner = "uv-venv-lock-runner" |
| 41 | +dependency_groups = ["type"] |
| 42 | +commands = [["basedpyright"]] |
136 | 43 |
|
137 | 44 | [env.mypy]
|
138 |
| -description = "Run mypy" |
139 |
| -dependency_groups = ["typecheck"] |
| 45 | +description = "basedmypy" |
| 46 | +runner = "uv-venv-lock-runner" |
| 47 | +dependency_groups = ["type"] |
140 | 48 | commands = [
|
141 | 49 | [
|
142 |
| - "uv", |
143 |
| - "pip", |
144 |
| - "freeze", |
145 |
| - ], |
146 |
| - [ |
147 |
| - "uv", |
148 |
| - "run", |
149 |
| - "--no-sync", |
150 | 50 | "mypy",
|
151 |
| - "--config-file=pyproject.toml", |
152 |
| - ".", |
153 |
| - ], |
| 51 | + "--tb", |
| 52 | + "--hide-error-context", |
| 53 | + "--hide-error-code-links", |
| 54 | + {replace = "posargs", default = ["."], extend = true}, |
| 55 | + ] |
154 | 56 | ]
|
155 |
| - |
156 |
| -[env.pyright] |
157 |
| -description = "Run pyright" |
158 |
| -dependency_groups = ["typecheck"] |
159 |
| -commands = [["uv", "pip", "freeze"], ["uv", "run", "--no-sync", "basedpyright"]] |
160 |
| - |
161 |
| -[env.typetest] |
162 |
| -description = "Run all type tests" |
163 |
| -depends = ["mypy", "pyright", "stubtest"] |
164 |
| -skip_install = true |
165 |
| -commands = [] |
0 commit comments