From bafa9f7cc53e14c32c46d05a9abfac2d1acdd0c9 Mon Sep 17 00:00:00 2001 From: Juro Oravec Date: Sat, 1 Feb 2025 10:06:14 +0100 Subject: [PATCH] docs: add details for development (#938) --- docs/overview/development.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/overview/development.md b/docs/overview/development.md index 4952c364..dcae1c26 100644 --- a/docs/overview/development.md +++ b/docs/overview/development.md @@ -19,10 +19,10 @@ To quickly run the tests install the local dependencies by running: pip install -r requirements-dev.txt ``` -You also have to install this local django-components version, initially and after every change you want to test: +You also have to install this local django-components version. Use `-e` for [editable mode](https://setuptools.pypa.io/en/latest/userguide/development_mode.html) so you don't have to re-install after every change: ```sh -pip install . +pip install -e . ``` Now you can run the tests to make sure everything works as expected: @@ -44,6 +44,20 @@ pyenv local 3.8 3.9 3.10 3.11 3.12 3.13 tox -p ``` +To run tests for a specific Python version, use: + +```sh +tox -e py38 +``` + +NOTE: See the available environments in `tox.ini`. + +And to run only linters, use: + +```sh +tox -e mypy,flake8,isort,black +``` + ## Running Playwright tests We use [Playwright](https://playwright.dev/python/docs/intro) for end-to-end tests. You will therefore need to install Playwright to be able to run these tests.