Commit dcdee05
Migrate to uv & ruff, remove black and isort (#290)
## Summary
This PR migrates the project's tooling from pip/black/isort/flake8 to
uv/ruff, and renames `master` → `main` in CI.
### CI changes
- **uv**: replaced pip with uv for all package management in CI; `uv
venv` + `uv pip install` for virtual environment setup and dependency
installation
- **ruff**: replaced black (formatter) + isort (import sorter) + flake8
(linter) with a single `ruff` invocation; added a new `check` job that
runs `ruff format --diff`, `ruff check --select I,RUF022 --diff`
(isort), and `ruff check`
- **Branch rename**: updated CI trigger and publish step to target
`main` instead of `master`
### Script changes (`tests/`)
- `install-demo-module.sh`: replaced `pip install` with `uv pip install
--python <exe>` to install into the active venv without requiring pip to
be present (uv venv doesn't include pip by default)
- `check-demo-stubs-generation.sh`: replaced `black` + `isort` with
`ruff format` + `ruff check --select I,RUF022 --fix`; added dynamic
`--target-version` to handle PEP 695 syntax in Python 3.12+ stubs;
removed `--diff` flag from the fix step (diffs are shown later by `git
diff --exit-code`)
- `check-demo-errors-generation.sh`: removed `uv run` wrapper (not
compatible with tox's virtual env activation)
### tox changes
- Removed `requirements-dev.txt` dependency (replaced with inline `deps`
in tox.ini)
- Fixed parallel run: `PYTHON_TAG_FILE` now uses `{envtmpdir}` (per-env)
instead of a shared path under `{toxinidir}/tmp/`
- Added `cmeel-eigen` to `deps` so it's available during `commands_pre`
(cmake build)
### Reference stubs
- Reformatted all reference stubs under `tests/stubs/` with ruff (import
ordering and style differ slightly from isort+black)
- Updated `requirements.txt` files: removed `black` and `isort`, added
`ruff>=0.14.14`
### pyproject.toml
- Added `exclude = ["tests/stubs"]` to `[tool.ruff]` to prevent ruff
from parsing PEP 695 stub syntax (e.g. `def f[T](...)`) with a `py310`
target version
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Sergey Shumakov <skarn@Sergeys-MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 80a777e commit dcdee05
81 files changed
Lines changed: 753 additions & 548 deletions
File tree
- .github/workflows
- tests
- stubs
- python-3.10
- pybind11-v3.0/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- python-3.11
- pybind11-v2.11/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.13
- numpy-array-use-type-var/demo/_bindings
- aliases
- numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.9/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v3.0
- numpy-array-use-type-var/demo/_bindings
- aliases
- numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- python-3.12
- pybind11-v2.11/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.12/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.13
- numpy-array-use-type-var/demo/_bindings
- aliases
- numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v2.9/numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- pybind11-v3.0
- numpy-array-use-type-var/demo/_bindings
- aliases
- numpy-array-wrap-with-annotated/demo/_bindings
- aliases
- python-3.8/pybind11-v2.13/numpy-array-wrap-with-annotated/demo/_bindings
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
13 | 39 | | |
14 | 40 | | |
15 | 41 | | |
| 42 | + | |
16 | 43 | | |
17 | 44 | | |
18 | 45 | | |
19 | 46 | | |
20 | 47 | | |
21 | 48 | | |
22 | | - | |
23 | | - | |
| 49 | + | |
24 | 50 | | |
25 | 51 | | |
26 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
27 | 55 | | |
28 | 56 | | |
29 | 57 | | |
30 | 58 | | |
31 | 59 | | |
32 | 60 | | |
33 | 61 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| 164 | + | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
165 | | - | |
166 | 169 | | |
167 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | 176 | | |
170 | | - | |
| 177 | + | |
171 | 178 | | |
172 | 179 | | |
173 | | - | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
178 | | - | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
182 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
186 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
| |||
196 | 207 | | |
197 | 208 | | |
198 | 209 | | |
199 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
200 | 213 | | |
201 | 214 | | |
202 | 215 | | |
| |||
219 | 232 | | |
220 | 233 | | |
221 | 234 | | |
| 235 | + | |
| 236 | + | |
222 | 237 | | |
223 | 238 | | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
227 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
228 | 247 | | |
229 | 248 | | |
230 | | - | |
| 249 | + | |
231 | 250 | | |
232 | 251 | | |
233 | 252 | | |
234 | 253 | | |
235 | | - | |
| 254 | + | |
236 | 255 | | |
237 | 256 | | |
238 | 257 | | |
239 | | - | |
| 258 | + | |
240 | 259 | | |
241 | 260 | | |
242 | 261 | | |
243 | 262 | | |
| 263 | + | |
244 | 264 | | |
245 | 265 | | |
246 | 266 | | |
| |||
249 | 269 | | |
250 | 270 | | |
251 | 271 | | |
252 | | - | |
| 272 | + | |
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | 34 | | |
23 | 35 | | |
| |||
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | | - | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
73 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
84 | | - | |
85 | 80 | | |
86 | 81 | | |
87 | 82 | | |
88 | 83 | | |
89 | 84 | | |
90 | | - | |
91 | 85 | | |
92 | 86 | | |
93 | 87 | | |
| |||
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
109 | | - | |
110 | 103 | | |
111 | 104 | | |
112 | 105 | | |
| |||
0 commit comments