Commit a915678
Fix and simplify check-python dev script (#1934)
I revisited and simplified a few things in the `check-python` dev
script, partially as follow-up of
tiny-pilot/tinypilot-pro#1714:
- Fix `ADDITIONAL_PY_SCRIPTS` (which was outdated) for a dynamic lookup
mechanism, which ensures to always catch all scripts in `scripts/`.
- Consolidate `check-for-init-python-files` into the `check-python`
script. It seemed weird to me to have this script separately and
everything else embedded.
- Fix some bash quotes (`"`→`'`)
This structure also makes it a bit easier to include the front panel
sources here: I realized that the `check-python` script also doesn’t
sufficiently account for the front panel. So for the upstream merge, I
plan to add these changes ([see this Pro branch I used for
testing](tiny-pilot/tinypilot-pro@master...check-python)):
- 👉 In Pro’s CircleCI config, we have to install the front panel venv
before running `check-python`. That actually triggers some missing
ignore-directives (e.g., in `.yapfignore`), that also would show up when
running locally.
- 👉 `ruff` doesn’t cover the front panel, so we have to add it there.
- ✅ `yapf` already covers the front panel.
- ❌ `coverage` doesn’t include the front panel – we don’t have any tests
in the front panel, but I also wasn’t able to figure out how to make it
even look there…
- ❌ `pylint` doesn’t include the front panel – unfortunately, [I wasn’t
able to make that happen
trivially](tiny-pilot/tinypilot-pro#1731), so
we should look into this separately – there are some minor style
violations there.
I think the aforementioned problems would profit from a [revised project
structure](tiny-pilot/tinypilot-pro#1721),
where we properly share dev dependencies for both our Python services.
The current nested structure doesn’t seem to lend itself as nicely for
this.
<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1934"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
---------
Co-authored-by: Jan Heuermann <jan@jotaen.net>1 parent 8da71bc commit a915678
3 files changed
Lines changed: 35 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 14 | | |
27 | 15 | | |
28 | | - | |
| 16 | + | |
29 | 17 | | |
30 | | - | |
| 18 | + | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | | - | |
37 | | - | |
| 24 | + | |
| 25 | + | |
38 | 26 | | |
39 | | - | |
| 27 | + | |
40 | 28 | | |
41 | 29 | | |
42 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
49 | | - | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | | - | |
| 65 | + | |
53 | 66 | | |
54 | | - | |
| 67 | + | |
| 68 | + | |
0 commit comments