Skip to content
GitHubRSS

Contributing

Terminal window
# Clone and install
git clone https://github.com/BigBrotr/bigbrotr.git
cd bigbrotr
uv sync --group dev --group docs
# Verify everything works
make ci
  • main is release-ready. Never push directly.
  • develop is the integration branch. Never push directly.
  • All work happens on feature branches created from develop.
Terminal window
git checkout develop
git pull origin develop
git checkout -b feat/my-feature

Branch names follow the commit type prefix:

PrefixPurpose
feat/New features
fix/Bug fixes
refactor/Code restructuring
docs/Documentation changes
test/Test additions or fixes
chore/Build, CI, dependency updates

Conventional Commits format:

feat: add relay timeout configuration
fix: handle empty NIP-11 response
refactor: simplify metadata hash computation
docs: update architecture overview
test: add validator edge case tests
chore: bump asyncpg to 0.29.0

The body explains why, not what. The footer references issues: Closes #123.

Before committing, run the full CI suite:

Terminal window
make ci

This runs:

CheckCommandPurpose
Lintruff check src/ tests/Code quality (zero errors expected)
Formatruff format --check src/ tests/Code formatting
Typesmypy src/bigbrotrStrict type checking
Testspytest tests/ --ignore=tests/integration/Unit tests

Coverage must stay above 80% (branch coverage).

  • Line length: 100 characters
  • Target: Python 3.11+
  • Formatter/Linter: ruff (replaces black, isort, flake8)
  • Type checker: mypy in strict mode
# Same package: relative imports
from .logger import Logger
from .common.configs import ClearnetConfig
# Cross-package: absolute imports
from bigbrotr.core.logger import Logger
from bigbrotr.models.constants import NetworkType

Parent-relative imports are banned: from ..core import Logger is not allowed.

The diamond DAG must be maintained. Never import upward:

  • models imports only from stdlib
  • core imports only from models
  • utils imports only from models
  • nips imports from utils and models
  • services imports from core, nips, utils, and models

PRs target develop. Include:

  • Clear description of what changed and why
  • Link to related issues
  • Evidence that make ci passes