python3 -m venv env
Linux:
source env/bin/activate
Windows:
env\Scripts\activate.bat
python -m pip install -r requirements.txt
This contains the requirements for the program itself.
python -m pip install -r dev_requirements.txt
This is necessary make verifying of the code easier and formats the code automatically to match the coding style.
pre-commit install
This installs the pre-commit git hooks for the project and makes it possible to run the pre-commit script automatically when committing.
To manually run the pre-commit script:
pre-commit run --all-files
Make sure you enabled the virtual environment. Tox tests the code for multiple environments (3.8, 3.9) and checks code with flake8 and mypy (only on Python Version 3.8). To run Tox:
tox
Make sure you enabled the virtual environment. PyTest runs the unit tests for the code. To run PyTest:
python -m pytest
Make sure you enabled the virtual environment. Flake8 checks the code for errors and warnings. To run Flake8:
flake8 src
Make sure you enabled the virtual environment. Black formats the code to match the coding style. To run Black:
black src