In order to run the test and the lint check of the project Poetry must be installed.
Once poetry is installing the dependencies of the project is a matter of running the following command:
poetry install
To run the project tests simply run the following command:
poetry run pytest
The python files of the project are formatted using Black.
To format the code before committing it you can run:
poetry run black .
To validate the code against the rules of the project Ruff is required.
Linting can be executed with the following command:
poetry run ruff --fix .
The project relies on mypy to type check python files.
Type checking can be achieved with the following command:
poetry run mypy --install-types .
Pre-commit hooks can be installed using the pre-commit tool. Once the tool is installed the pre-commit hooks must be added to git by running the command
pre-commit install