Contributing#
Thank you for considering contributing to oxo-flow! This guide covers everything you need to get started.
Development Setup#
Prerequisites#
- Rust 1.85+ (edition 2024) — rustup.rs
- Git 2.x+
- MkDocs 1.5+ (optional, for docs) —
pip install mkdocs-material
Clone and Build#
Run Tests#
Run All CI Checks Locally#
Project Structure#
oxo-flow/
├── crates/
│ ├── oxo-flow-core/ # Core library: DAG, executor, environments, reporting
│ ├── oxo-flow-cli/ # CLI binary (oxo-flow command)
│ ├── oxo-flow-web/ # Web REST API (axum-based)
│ └── venus/ # Venus tumor variant calling pipeline
├── pipelines/ # Pipeline definitions (.oxoflow files)
├── examples/ # Example workflows
├── tests/ # Integration tests
└── docs/ # Documentation (MkDocs)
Code Style#
| Convention | Rule |
|---|---|
| Formatting | cargo fmt — enforced in CI |
| Linting | cargo clippy -- -D warnings — all warnings are errors |
| Error handling | thiserror for library errors, anyhow for binary errors |
| Naming | snake_case for functions, PascalCase for types |
| Async | tokio for async runtime |
| Logging | tracing for structured logging |
Making Changes#
1. Create a branch#
2. Make your changes#
- Keep changes focused — one feature or fix per PR
- Add tests for new functionality
- Update documentation if behavior changes
3. Run CI checks#
All four checks must pass:
-
cargo fmt -- --check -
cargo clippy --workspace -- -D warnings -
cargo build --workspace -
cargo test --workspace
4. Commit with Conventional Commits#
We use Conventional Commits for automated changelog generation:
feat: add SLURM job array support
fix: correct wildcard expansion for nested patterns
docs: update CLI reference for new subcommands
test: add integration tests for web API
refactor: simplify DAG cycle detection
chore: update dependencies
5. Submit a Pull Request#
- Target the
mainbranch - Include a clear description of what changed and why
- Reference related issues if applicable
- Ensure CI passes
Adding a New CLI Subcommand#
- Add the Clap subcommand variant in
crates/oxo-flow-cli/src/main.rs - Implement the handler function
- Add integration tests
- Update CLI documentation in
docs/guide/src/commands/
Adding a New Core Feature#
- Add or modify the relevant module in
crates/oxo-flow-core/src/ - Update
lib.rsto export new public types - Add unit tests in the same file
- Update API documentation
Testing Guidelines#
| Test type | Location |
|---|---|
| Unit tests | #[cfg(test)] modules within source files |
| Integration tests | tests/ directory at workspace root |
| Web API tests | crates/oxo-flow-web/src/lib.rs |
| CLI tests | crates/oxo-flow-cli/src/main.rs |
Run all tests:
Documentation#
- MkDocs source:
docs/guide/src/ - Build locally:
cd docs/guide && mkdocs serve - API docs:
cargo doc --workspace --open - When CLI behavior changes, update the corresponding command reference page
Licensing#
| Crate | License |
|---|---|
| oxo-flow-core | Apache 2.0 |
| oxo-flow-cli | Apache 2.0 |
| oxo-flow-venus | Apache 2.0 |
| oxo-flow-web | Dual (Academic free / Commercial paid) |
By contributing, you agree that your contributions will be licensed under the same terms as the project.
Questions?#
Open an issue at github.com/Traitome/oxo-flow/issues for questions, bug reports, or feature requests.