docs: add details for development (#938)

This commit is contained in:
Juro Oravec 2025-02-01 10:06:14 +01:00 committed by GitHub
parent bfd917fa20
commit bafa9f7cc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.