Contributing to GlowBack
Thank you for your interest in contributing! This guide covers everything you need to get started.
Code of Conduct
All participants are expected to follow our Code of Conduct.
Getting Started
- Fork the repository and clone your fork.
- Install prerequisites:
- Rust (stable toolchain — see
rust-toolchain.toml) - Python 3.10+ for requirements-based API/UI/docs workflows (CI uses 3.12;
ui/pyproject.tomlpins 3.12 foruv) - maturin when building the local
gb-pythonextension (python -m pip install maturin) - Build and run the test suite:
cargo test --workspace --locked
- Launch the Streamlit UI locally:
cd ui
pip install -r requirements.txt
streamlit run app.py
Development Workflow
- Create a branch from
main:git checkout -b feat/my-feature main - Make focused, well-scoped changes.
- Write or update tests for any new behavior.
- Update documentation if user-facing behavior changes.
- Run the full test suite before pushing.
- Open a pull request with a clear summary and test notes.
Releases
GlowBack releases are cut manually from a previously built CI artifact so a maintainer can publish a version without rebuilding during the release step. See Releasing GlowBack for the exact workflow and inputs.
Repository Layout
| Directory | Description |
|---|---|
crates/ |
Rust workspace crates |
crates/gb-types/ |
Core types, strategies, and metrics |
crates/gb-engine/ |
Backtest simulation engine |
crates/gb-data/ |
Data ingestion and storage |
crates/gb-python/ |
PyO3 Python bindings |
ui/ |
Streamlit web UI |
docs/ |
MkDocs documentation source |
docker/ |
Dockerfiles for services |
.github/ |
CI workflows and issue templates |
Testing
Rust
# Run all workspace tests
cargo test --workspace --locked
# Run tests for a specific crate
cargo test -p gb-types --locked
cargo test -p gb-engine --locked
Python / API / UI
python -m pip install -r api/requirements.txt -r ui/requirements.txt httpx
PYTHONPATH="$PWD" python -m compileall api ui
PYTHONPATH="$PWD" python -m unittest discover -s api/tests -v
PYTHONPATH="$PWD" python -m unittest discover -s ui/tests -v
To run the API locally from the api/ directory, include the repository root on PYTHONPATH so glowback_runtime.py is importable:
cd api
PYTHONPATH=.. uvicorn app.main:app --reload
CI Checks
Every pull request runs:
- Rust Build Pipeline (
rust.yml) — crate-scoped Rust build/tests, Python API/UI tests, and release artifact packaging on eligiblemainbuilds - Docs Guard (
docs-guard.yml) — requires a docs update when a PR changes user-facing code unless maintainers applyno-docs - Docs Smoke (
docs-smoke.yml) — runs./scripts/quickstart.sh,./scripts/python_sdk_quickstart.sh,./scripts/csv_data_tutorial.sh,./scripts/replay_manifest_tutorial.sh, andmkdocs build --strictfor docs/example changes - Docs Deploy (
docs.yml) — builds and publishes the MkDocs site frommain
Pull Request Guidelines
- Fill out the PR template (summary, checklist, docs note).
- Keep PRs focused — one logical change per PR.
- Reference related issues (e.g.,
Fixes #14). - Ensure all CI checks pass before requesting review.
- Delete your feature branch after merge.
Reporting Issues
- Bugs: Use the Bug Report template.
- Features: Use the Feature Request template.
- Security: See Security Policy — do not open public issues for vulnerabilities.
Documentation
We use MkDocs Material. To preview docs locally:
python -m pip install mkdocs-material pymdown-extensions
python -m mkdocs serve
The site auto-deploys to GitHub Pages when changes merge to main.
License
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE).