Contributing
Contributions to Torc are welcome! This guide will help you get started.
Development Setup
- Fork and clone the repository:
git clone https://github.com/your-username/torc.git
cd torc
- Install Rust and dependencies:
Make sure you have Rust 1.70 or later installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install SQLx CLI:
cargo install sqlx-cli --no-default-features --features sqlite
- Set up the database:
# Create .env file
echo "DATABASE_URL=sqlite:torc.db" > .env
# Run migrations
sqlx migrate run
- Build and test:
cargo build
cargo test
Making Changes
Code Style
Run formatting and linting before committing:
# Format code
cargo fmt
# Run clippy
cargo clippy --all-targets --all-features
# Run all checks
cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings
Adding Tests
All new functionality should include tests:
# Run specific test
cargo test test_name -- --nocapture
# Run with logging
RUST_LOG=debug cargo test -- --nocapture
Database Migrations
If you need to modify the database schema:
# Create new migration
sqlx migrate add <migration_name>
# Edit the generated SQL file in migrations/
# Run migration
sqlx migrate run
# To revert
sqlx migrate revert
Submitting Changes
- Create a feature branch:
git checkout -b feature/my-new-feature
- Make your changes and commit:
git add .
git commit -m "Add feature: description"
- Ensure all tests pass:
cargo test
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
- Push to your fork:
git push origin feature/my-new-feature
- Open a Pull Request:
Go to the original repository and open a pull request with:
- Clear description of changes
- Reference to any related issues
- Test results
Pull Request Guidelines
- Keep PRs focused - One feature or fix per PR
- Add tests - All new code should be tested
- Update documentation - Update README.md, DOCUMENTATION.md, or inline docs as needed
- Follow style guidelines - Run
cargo fmtandcargo clippy - Write clear commit messages - Describe what and why, not just how
Areas for Contribution
High Priority
- Performance optimizations for large workflows
- Additional job runner implementations (Kubernetes, etc.)
- Improved error messages and logging
- Documentation improvements
Features
- Workflow visualization tools
- Job retry policies and error handling
- Workflow templates and libraries
- Integration with external systems
Testing
- Additional integration tests
- Performance benchmarks
- Stress testing with large workflows
Code of Conduct
Be respectful and constructive in all interactions. We’re all here to make Torc better.
Questions?
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing issues and discussions first
License
By contributing, you agree that your contributions will be licensed under the BSD 3-Clause License.