Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 1.46 KB

CONTRIBUTING.md

File metadata and controls

36 lines (30 loc) · 1.46 KB

Contributing

This repository uses poetry for the package and different tools to ensure code quality. These are:

  • Static type checkers: In order to ensure type safety, mypy and pyanalyze (semi-static) are used.
  • Spell checker: To fix basic typos, codespell is used.
  • Linting: To ensure quality code is created, ruff is used. This tool groups main features provided by pylint and flake8 but it is extremely fast and memory safe, as it is implemented in rust.
  • Testing: To create easier to maintain code and bug free, pytest with pytest-cov and pytest-deadfixtures are used.
  • Autoformatter: To ensure code is written in a homogeneous way among different developers, black is being used.

These tools can be easily launched with:

poetry run python check_code.py
poetry run python check_code.py --auto-run  # Creates a pre-push hook
poetry run python check_code.py --disable-auto-run  # Disables pre-push hook

Or you can run them separately as:

poetry run pytest
poetry run black .
poetry run ruff .
poetry run codespell .