Contributing to QuantWave
First off, thank you for considering contributing to QuantWave! It's people like you who make it such a great tool.
Development Workflow
Prerequisites
- Rust (2024 edition)
- Python 3.12+
cargo-nextest
Local Setup
- Clone the repository:
- Set up the virtual environment:
- Build the project:
- Install the pre-push quality gate (runs
./scripts/quantwave_verify.shbefore each push): Emergency bypass:SKIP_PRE_PUSH_VERIFY=1 git push
Force full rebuild:VERIFY_NO_CACHE=1 git push
Cache status:python3 scripts/verify_cache.py status
Running Tests
We use nextest for Rust tests:
Managing the build cache (target/)
Cargo never garbage-collects target/. Artifacts are hash-named per (crate version × enabled features × toolchain × build profile), so dependency bumps, toolchain updates, and repeated build / test / clippy / nextest runs all deposit new files without removing the superseded ones. On a long-lived checkout target/ can grow to tens of GB (debug builds carry full debug symbols).
Keep it in check with cargo-sweep:
# one-time install
cargo install cargo-sweep
# remove artifacts not touched in the last 15 days
cargo sweep --time 15
# drop artifacts built by toolchains other than the current one
cargo sweep --installed
For a full reset, cargo clean (or rm -rf target/debug) reclaims everything at the cost of a full recompile. To shrink debug builds up front, set debug = "line-tables-only" under [profile.dev] in the root Cargo.toml.
Adding a New Indicator
- Implement Core Logic: Add the indicator to
quantwave-core/src/indicators/implementing theNext<T>trait. - Add Polars Expression: Expose the indicator in
quantwave-pluginsorquantwave-polars. - Write Tests:
- Unit tests in
quantwave-core. - Parity tests (Streaming vs. Batch).
- Add to
gold_standardif applicable. - Document: Add the indicator to
metadata.rsand regenerate the metadata registry (python scripts/regenerate_metadata_registry.py). Then generate its documentation skeleton usingpython scripts/generate_native_docs.py(which emits intodocs/guides/indicators/native/). Hand-enrich the generated page with visuals following DOCUMENTATION_STANDARDS.md. Generate previews withpython docs/generate_all_previews.py --sync-docs. Runpython docs/upgrade_to_standards.py --lintandpython docs/upgrade_to_standards.py --depth-lintbefore landing doc changes.
Style Guidelines
- Follow idiomatic Rust (run
cargo clippy). - Ensure all public functions have docstrings.
- Keep performance in mind; avoid unnecessary allocations.
Reporting Issues
Please use the GitHub issue tracker to report bugs or request features.