Contributing to Waku¶
Prerequisites¶
- Python 3.11+
- uv (package manager)
- Task (task runner; shell completions recommended)
- Git
Development Setup¶
-
Fork the repository on GitHub, then clone your fork:
-
Install dependencies and pre-commit hooks:
-
Verify the setup:
Making Changes¶
-
Create a branch from
master:Branch naming uses the same types as commits:
feat/snapshot-support,fix/module-init-order,docs/provider-guide. -
Make your changes and write tests.
-
Run the full check suite:
For faster iteration on individual files:
-
Commit following the conventions below.
-
Push and open a pull request against
master:
Commit Conventions¶
Commits are validated by gitlint via a pre-commit hook.
Format¶
Scope is optional but encouraged for non-trivial changes.
Types¶
| Type | Purpose |
|---|---|
feat |
New feature (minor version bump) |
fix |
Bug fix (patch version bump) |
perf |
Performance improvement (patch version bump) |
docs |
Documentation only |
test |
Adding or updating tests |
refactor |
Code change that neither fixes a bug nor adds a feature |
style |
Formatting, whitespace |
build |
Build system or dependency changes |
ci |
CI configuration |
chore |
Maintenance tasks |
Scopes¶
| Scope | Area |
|---|---|
core |
Core framework (WakuApplication, WakuFactory, modules) |
cqrs |
CQRS/Mediator system |
di |
Dependency injection helpers |
es |
Event sourcing |
ext |
Extension system |
validation |
Module validation |
deps |
Dependency updates |
docs |
Documentation tooling |
infra |
Infrastructure, deployment |
linters |
Linter configuration |
release |
Release process |
tests |
Test infrastructure |
Examples¶
feat(cqrs): add retry behavior for pipeline
fix(core): resolve module init order for circular imports
docs: add event sourcing guide
test(ext): cover lifecycle hook edge cases
build(deps): bump dishka to 1.9.0
Breaking Changes¶
Append ! after the type/scope:
Code Standards¶
Pre-commit hooks run on every commit (linting, formatting) and on push (type checking, dependency auditing, security):
- Ruff — linting and formatting (
extend-select = ["ALL"], single quotes, 120 char line length) - mypy — strict type checking
- ty and Pyrefly — additional type checking
- Deptry — unused/missing dependency detection
- Typos — spell checking
- pysentry-rs — dependency vulnerability scanning
Key Rules¶
- Explicit type annotations everywhere
- No relative imports
- Google-style docstrings for public APIs
collections.abcfor abstract types, plainlist/dictfor concreteProtocol/ABCfor interfaces withIPascalCasenaming (e.g.,IMediator)
Testing¶
Tests use pytest with anyio. Both asyncio and uvloop backends are tested automatically.
Coverage minimum: 96%. Test files mirror the source structure under tests/.
CI Pipeline¶
Every pull request against master triggers:
- Change detection — only relevant checks run based on which files changed
- Linting — ruff check + format verification
- Type checking — mypy, ty, pyrefly
- Spell checking — typos
- Tests — pytest across Python 3.11, 3.12, 3.13, and 3.14
- Coverage — 96% threshold
Pull Requests¶
- One feature or fix per PR
- Link related issues (e.g., "Fixes #123")
- Include tests for new functionality
- Update documentation if the change affects public APIs
featandfixcommits appear in release notes via semantic release — write commit messages accordingly
Reporting Issues¶
Search existing issues first.
- Bugs: Use the bug report template with a minimal reproduction.
- Features: Use the feature request template with problem statement and proposed API.
First-Time Contributors¶
Look for issues labeled good first issue or help wanted. Comment on the issue to claim it before starting.
Getting Help¶
- GitHub Discussions — questions and ideas
- GitHub Issues — bugs and feature requests