From 13db696c35a3fc69734ddbb9973934188ccd5397 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Thu, 7 Nov 2024 10:34:34 +0100 Subject: [PATCH] also describe pre-commit --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 910b031..b1c7e2a 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,23 @@ uv pip install -e ".[dev]" This creates the virtual environment in the `.venv` directory. To activate the environment in your shell, you need to `source` the correct activation script from `.venv/bin`, e.g. `.venv/bin/activate` for bash. +### Install `pre-commit` + +To check and format the code automatically, you can use `pre-commit`. +In general, you can use the latest version. + +```bash +pipx install pre-commit +pre-commit install +``` + +Now, the checks will be run automatically before each commit. +The first time you might have some delay because the hooks are installed. + ### Install `nox` To run the tests the same way as in the CI, you can use `nox`. In general, you can use the latest version. -It's suggested to install it with `pipx` but any other way is fine too. ```bash pipx install nox