Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 2 KB

CONTRIBUTING.md

File metadata and controls

75 lines (49 loc) · 2 KB

For Contributors

Most of the setup is automated with make. Check the Makefile to learn more.

Requirements

  • Python>=3.11
  • make:

Setup

make will take care of setting a the virtual environment (it will be located in .venv). It will also install pdm and with it all dependencies.

make bootstrap
make dev

Setting up pre-commit hooks

pre-commit should be used to run checks on staged changes before each commit and to enforce the commit message style.

Before you start development, please install the hooks like so:

pre-commit install && pre-commit install --hook-type commit-msg

Development

In order to have notifications in your terminal on macOS, you can install a package for that like so: brew install terminal-notifier

To run all of the checks below (formatting, testing, linting, typechecks) run:

make ci

Testing

To trigger pytest (TODO: and coverage):

make test

Static Analysis

By default this project is set up to lint with flake8 and mypy, while autopep8 and isort take care of autofixing. To run linters and static analyzers:

make format   # ruff fixes
make lint     # ruff checks
make mypy     # mypy

Commit Message Style

A uniform commit message style and here. for better readibilty shall be enforced to be able to generate a changelog.

Commit message should be prefixed with one of the following:

fix: | feat: | docs: | style: | refactor: | perf: | test: | build: | ci: | chore: | revert:.

Example

git commit -m "feat: adds support for new feature"