Commit 1682ff1
authored
chore: Replace Makefile with poethepoet task runner (#1678)
### Description
Migrates from `Makefile` to [Poe the Poet](https://poethepoet.natn.io/)
for task running. This is something I've wanted to do for a long time -
having a more Pythonic solution than `Makefile`, that keeps all project
configuration in `pyproject.toml`, similar to how `npm` scripts work in
`package.json`.
### Motivation
- Consistency across technologies – The company primarily works with
JS/TS, and Poe the Poet is conceptually the closest equivalent to how
this is handled there via npm scripts.
- Cross-platform compatibility – Makefiles can cause issues on Windows
(shell differences, GNU tooling, quoting, ...), whereas Poe the Poet is
a pure Python solution that works everywhere Python works.
- Single source of configuration – Over time, we have consolidated the
configuration of most tools (linter, type checker, formatter, pytest, …)
into a single file (`pyproject.toml`), which is also a long-term trend
in the Python ecosystem. Moving task definitions into Poe the Poet
within `pyproject.toml` is a natural next step in this direction.
- Being Pythonic – Poe the Poet is a Python-native tool designed
specifically for running tasks in Python projects. Makefile, on the
other hand, is a general, historically Unix-centric tool originally
intended for building and linking C/C++ software 😄. Meaning it is
definitely a less natural fit for pure Python projects. The presence of
a Makefile in a Python open-source library is, at the very least,
surprising 😄.
### Changes
- Remove `Makefile`.
- Add `poethepoet` as a dev dependency.
- Add `[tool.poe.tasks]` section in `pyproject.toml` with all tasks.
- Update `CONTRIBUTING.md` with new commands and `poe` documentation.
- Update GitHub workflows to use `uv run poe` commands.
- Update `.pre-commit-config.yaml` to use `poe` tasks.
### Usage
Tasks are now run with `uv run poe <task>` (or just `poe <task>` if you
have venv actived):
```sh
uv run poe install-dev
uv run poe lint
uv run poe format
uv run poe type-check
uv run poe unit-tests
uv run poe check-code
uv run poe build-docs
uv run poe run-docs
```1 parent 42947c8 commit 1682ff1
File tree
8 files changed
+113
-110
lines changed- .github/workflows
- tests/unit/crawlers/_playwright
8 files changed
+113
-110
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
| 56 | + | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
11 | 31 | | |
12 | 32 | | |
13 | 33 | | |
14 | 34 | | |
15 | 35 | | |
16 | | - | |
| 36 | + | |
17 | 37 | | |
18 | 38 | | |
19 | 39 | | |
20 | 40 | | |
21 | 41 | | |
22 | 42 | | |
23 | 43 | | |
24 | | - | |
| 44 | + | |
25 | 45 | | |
26 | 46 | | |
27 | 47 | | |
| |||
31 | 51 | | |
32 | 52 | | |
33 | 53 | | |
34 | | - | |
| 54 | + | |
35 | 55 | | |
36 | 56 | | |
37 | 57 | | |
| |||
41 | 61 | | |
42 | 62 | | |
43 | 63 | | |
44 | | - | |
| 64 | + | |
45 | 65 | | |
46 | 66 | | |
47 | 67 | | |
| |||
51 | 71 | | |
52 | 72 | | |
53 | 73 | | |
54 | | - | |
| 74 | + | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | | - | |
60 | | - | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
64 | 82 | | |
65 | 83 | | |
66 | | - | |
| 84 | + | |
67 | 85 | | |
68 | 86 | | |
69 | | - | |
| 87 | + | |
70 | 88 | | |
71 | 89 | | |
72 | | - | |
| 90 | + | |
73 | 91 | | |
74 | 92 | | |
75 | 93 | | |
76 | 94 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 95 | + | |
81 | 96 | | |
| 97 | + | |
| 98 | + | |
82 | 99 | | |
83 | 100 | | |
84 | 101 | | |
85 | 102 | | |
86 | | - | |
| 103 | + | |
87 | 104 | | |
88 | 105 | | |
89 | 106 | | |
90 | 107 | | |
91 | 108 | | |
92 | 109 | | |
93 | | - | |
| 110 | + | |
94 | 111 | | |
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
98 | | - | |
| 115 | + | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
| |||
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
123 | | - | |
| 140 | + | |
124 | 141 | | |
125 | | - | |
126 | | - | |
| 142 | + | |
| 143 | + | |
127 | 144 | | |
128 | 145 | | |
129 | | - | |
| 146 | + | |
130 | 147 | | |
131 | | - | |
| 148 | + | |
132 | 149 | | |
133 | 150 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments