Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.65 KB

CONTRIBUTING.md

File metadata and controls

35 lines (20 loc) · 1.65 KB

Contributing Guidelines

First off, thanks for considering to contribute to this project!

These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Git hooks

We use git hooks through pre-commit to enforce and automatically check some "rules". Please install them (pre-commit install) before to push any commit.

See the relevant configuration file: .pre-commit-config.yaml.

Code Style

Make sure your code roughly follows PEP-8 and keeps things consistent with the rest of the code:

  • sorted imports: isort is used to sort imports
  • static analysis: flake8 is used to catch some dizziness and keep the source code healthy.
  • static typing: mypy is used to have static type checks.

Commit linter

We use the linter commitizen with the Conventional Commits configuration (the default one).

The commit message writing process can be guided by using cz commit instead of git commit.

Run unit tests

In order to run unit tests, please consider installing the dependencies that are referenced in the requirement folder:

pip install -r requirements/unit_tests.txt

In particular, we use icontract in this context (this dependency is set as an extra dependency, as it might be unpackaged on some environments). The unit tests are run through pytest. This testing mode is actually used in the CI.