From f2b81d833ea5908658d62b6c2be328f5ddf9eb33 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Sun, 17 Nov 2024 00:44:04 +0100 Subject: [PATCH] Update development section in docs (#846) --- README.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 945bbb72..958327f2 100644 --- a/README.md +++ b/README.md @@ -142,40 +142,44 @@ You need at least: - Python 3.11+ - [Poetry][poetry-install] +### Installation + Install all packages, including all development requirements: ```bash poetry install ``` -Poetry creates by default an virtual environment where it installs all -necessary pip packages, to enter or exit the venv run the following commands: +_Poetry creates by default an virtual environment where it installs all +necessary pip packages_. + +### Pre-commit + +This repository uses the [pre-commit][pre-commit] framework, all changes +are linted and tested with each commit. To setup the pre-commit check, run: ```bash -poetry shell -exit +poetry run pre-commit install ``` -Setup the pre-commit check, you must run this inside the virtual environment: +And to run all checks and tests manually, use the following command: ```bash -pre-commit install +poetry run pre-commit run --all-files ``` -*Now you're all set to get started!* +### Testing -As this repository uses the [pre-commit][pre-commit] framework, all changes -are linted and tested with each commit. You can run all checks and tests -manually, using the following command: +It uses [pytest](https://docs.pytest.org/en/stable/) as the test framework. To run the tests: ```bash -poetry run pre-commit run --all-files +poetry run pytest ``` -To run just the Python tests: +To update the [syrupy](https://github.com/tophat/syrupy) snapshot tests: ```bash -poetry run pytest +poetry run pytest --snapshot-update ``` ## License