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¶
- Clone & create a branch
git clone <your-fork-url>
cd stream
git checkout -b <feature-or-fix>
- 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
-
Use VS Code with Ruff
-
Install the Ruff extension (
charliermarsh.ruff
) - Enable Format on Save
-
Disable other formatters/linters to avoid conflicts
-
Run the full check suite
ruff check . # lint + auto-fix suggestions
ruff format . # apply formatting
pytest # run tests
Coding Style¶
- Style guide – Google 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¶
- Ensure all checks pass:
ruff check .
ruff format --check .
pytest
- Add or update unit tests
- Update documentation if public APIs change
- Open a pull request and fill out the PR template
Thanks for contributing to Stream!