Contributing to behave-gen

July 26, 2026 ยท View on GitHub

Thanks for your interest in contributing! This guide covers setup, common commands, and the release process.

Setup

git clone https://github.com/MathiasPaulenko/behave-gen.git
cd behave-gen
make dev
pre-commit install

Development commands

CommandDescription
make helpShow all available targets.
make devInstall with dev extras.
make lintRun ruff check + mypy --strict.
make lint-fixAuto-fix lint issues.
make formatFormat the code with ruff format.
make format-checkVerify formatting without changes.
make testRun the test suite.
make test-covRun tests with coverage (fail under 80%).
make buildBuild sdist + wheel into ref/output/dist/.
make cleanRemove build artifacts and caches.

Pre-PR checklist

Before opening a pull request, make sure all of the following pass:

  • make lint (ruff check + mypy --strict)
  • make format-check (ruff format --check)
  • make test-cov passes with >= 80% coverage (configured in pyproject.toml)
  • New behavior is covered by tests
  • CHANGELOG.md updated under [Unreleased]

Release process

Releases are automated via the release.yml GitHub Actions workflow:

  1. Bump the version in pyproject.toml.
  2. Move the [Unreleased] section in CHANGELOG.md to the new version.
  3. Commit and push to main.
  4. The workflow detects the version bump, creates a git tag, builds the distributions, publishes to PyPI via Trusted Publishing (OIDC), and creates a GitHub Release with auto-generated notes.

Code style

  • Python >=3.11, from __future__ import annotations in every module.
  • ruff for linting and formatting (line length 100).
  • mypy --strict with no errors.
  • Frozen dataclasses where possible.
  • Public API documented with docstrings (Google style).