You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation.md
+40-21Lines changed: 40 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,62 +258,80 @@ For detailed guidelines and workflows, see {doc}`contributing`.
258
258
259
259
Now you can make your changes locally.
260
260
261
-
4. Install development tools:
261
+
4. Install the project and its development dependencies:
262
262
263
263
We highly recommend using modern, fast tooling for the development workflow.
264
264
We recommend using [{code}`uv`][uv].
265
265
If you don't have {code}`uv`, follow the installation instructions in the recommendation above (see {ref}`tip above <uv-recommendation>`).
266
266
See the [uv documentation][uv] for more information.
267
267
268
-
We also recommend installing [{code}`pre-commit`][pre-commit] to automatically run checks before each commit and [{code}`nox`][nox] to automate common development tasks.
269
-
270
268
::::{tab-set}
271
269
:sync-group: installer
272
270
273
271
:::{tab-item} {code}`uv` _(recommended)_
274
272
:sync: uv
275
-
The easiest way to install {code}`pre-commit` and {code}`nox` is via [{code}`uv`][uv]:
273
+
Install the project (including development dependencies) with [{code}`uv`][uv]:
274
+
275
+
```console
276
+
$ uv sync
277
+
```
278
+
279
+
:::
280
+
:::{tab-item} {code}`pip`
281
+
:sync: pip
282
+
If you really don't want to use [{code}`uv`][uv], you can install the project and the development dependencies into a virtual environment using {code}`pip`.
276
283
277
284
```console
278
-
$ uv tool install pre-commit
279
-
$ uv tool install nox
285
+
$ python -m venv .venv
286
+
$ source ./.venv/bin/activate
287
+
(.venv) $ python -m pip install -U pip
288
+
(.venv) $ python -m pip install -e . --group dev
280
289
```
281
290
282
291
:::
283
-
:::{tab-item} {code}`brew`
284
-
:sync: brew
285
-
On macOS with Homebrew, you can install {code}`pre-commit` and {code}`nox` with:
292
+
::::
293
+
294
+
5. Install pre-commit hooks to ensure code quality:
295
+
296
+
The project uses [pre-commit] hooks for running linters and formatting tools on each commit.
297
+
These checks can be run manually via [{code}`nox`][nox], by running:
298
+
299
+
```console
300
+
$ nox -s lint
301
+
```
302
+
303
+
They can also be run automatically on every commit via [{code}`prek`][prek] (recommended).
304
+
To set this up, install {code}`prek`, e.g., via:
305
+
306
+
::::{tab-set}
307
+
:::{tab-item} macOS and Linux
286
308
287
309
```console
288
-
$ brew install pre-commit nox
310
+
$ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
289
311
```
290
312
291
313
:::
292
-
:::{tab-item} {code}`pipx`
293
-
:sync: pipx
294
-
If you prefer to use [{code}`pipx`][pipx], you can install {code}`pre-commit` and {code}`nox` with:
0 commit comments