Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.27 KB

CONTRIBUTING.md

File metadata and controls

61 lines (37 loc) · 1.27 KB

How to contribute

In order to run the test and the lint check of the project Poetry must be installed.

Installing dependencies

Once poetry is installing the dependencies of the project is a matter of running the following command:

poetry install

Testing

To run the project tests simply run the following command:

poetry run pytest

Coding conventions

Code formatting

The python files of the project are formatted using Black.

To format the code before committing it you can run:

poetry run black .

Code linting

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 .

Type checking

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

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