Thank you for your interest in contributing to whisperX-FastAPI! We welcome contributions of all kinds, including bug fixes, new features, documentation improvements, and more.
feature/xxx → dev → main
fix/xxx ↗
- All development happens in feature branches targeting
dev devis the default branch — pull requests target it automaticallymainreceives periodic releases fromdevand is always production-ready
-
Fork the repository and clone it to your local machine.
-
Set up your development environment as described in the README.md.
-
Install pre-commit hooks to ensure code quality:
pip install pre-commit pre-commit install
This automatically runs on every commit:
- Format and lint with Ruff
- Type checking with mypy
- Common issue checks (trailing whitespace, large files, etc.)
- README badge updates from
pyproject.toml
git checkout dev && git pull
git checkout -b feat/my-thing # or fix/my-thinggh pr create --fill --draft # opens a draft PR to dev immediately--fill uses your commit messages as the title and body — no manual writing needed if your commits are descriptive.
gh pr ready # mark out of draft when done
gh pr merge --squash --auto # auto-merges when CI goes greenFeature branches are deleted automatically after merge.
Use Conventional Commits — the pre-commit hook enforces this via commitizen:
feat: add PostgreSQL support
fix: handle missing HF_TOKEN gracefully
chore: bump ruff to 0.15.2
docs: update contributing guide
- Follow PEP 8 and use type hints throughout.
- Keep functions and classes small and focused.
- Add or update docstrings for public functions and classes.
- Code must pass Ruff checks:
uv run ruff check .anduv run ruff format --check . - Code coverage must be at least 80%.
# All tests with coverage (CI standard)
uv run pytest --cov=app --cov-report=term --cov-fail-under=80
# Fast subset (unit + integration, no slow/load)
uv run pytest -m "not slow and not load"
# Single file
uv run pytest tests/unit/domain/entities/test_task.py
# Load tests (run manually, not in CI)
uv run pytest -m loadBadges in README are updated automatically when you commit changes to pyproject.toml. To update manually:
uv run python scripts/update-badges.py
uv run python scripts/update-badges.py --dry-run # preview only- PRs must target the
devbranch (the default). - Include a clear description of your changes and the motivation.
- Reference related issues (e.g.,
Fixes #123). - All CI checks must pass:
- Ruff linter and formatter
- mypy type checking
- All tests pass with ≥80% coverage
- Dependency review (no new high/critical vulnerabilities)
Releases are cut from main using release-please.
-
Features and fixes accumulate in
devvia squash-merged PRs with Conventional Commits. -
When
devis ready to ship, open a PR fromdev→main:gh pr create --base main --head dev --title "chore: release to main" -
After CI passes and the PR is merged to
main, release-please automatically creates a versioned release PR (e.g.chore(main): release 0.4.7) that bumpspyproject.tomland updatesCHANGELOG.md. -
Review the release PR, then merge it — release-please creates the git tag and GitHub release automatically.
uv.lock is kept in sync automatically: the Update Lock File workflow runs on any PR that touches pyproject.toml and commits the updated lock file to the PR branch.
If you find a bug or have a feature request, please open an issue with as much detail as possible.