Skip to content

Contribute

Contributing Guidelines

When contributing to the framework, please follow these guidelines:

  • Use Google's Python Style Guide
  • Use Google-style docstrings for classes, functions, and methods.
    See examples here
  • Update the documentation when you change or add public functionality

Quick Setup

  1. Clone & create a branch
git clone <your-fork-url>
cd stream
git checkout -b <feature-or-fix>
  1. Install the dev tools (one-time only)
# Python ≥ 3.11
python -m venv .venv
source .venv/bin/activate
pip install -U pip ruff pre-commit pytest
pre-commit install  # hooks run on every commit
  1. Use VS Code with Ruff

  2. Install the Ruff extension (charliermarsh.ruff)

  3. Enable Format on Save
  4. Disable other formatters/linters to avoid conflicts

  5. Run the full check suite

ruff check .       # lint + auto-fix suggestions
ruff format .      # apply formatting
pytest             # run tests

Coding Style

  • Style guideGoogle Python Style Guide
  • Line length – 120 characters (enforced by Ruff)
  • Docstrings – Google-style
    (see example)
  • Type hints – Required for all public functions, classes, and methods

Submitting a Pull Request

  1. Ensure all checks pass:
ruff check .
ruff format --check .
pytest
  1. Add or update unit tests
  2. Update documentation if public APIs change
  3. Open a pull request and fill out the PR template

Thanks for contributing to Stream!