Thank you for considering contributing to Decision Engine! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to abide by our Code of Conduct.
Bug reports help make Decision Engine more stable. When you submit a bug report, please include:
- Version Information: Include the Decision Engine version you're using
- Environment: Include OS, Rust version, Redis version, etc.
- Steps to Reproduce: Detailed steps to reproduce the bug
- Expected vs. Actual Behavior: What you expected vs. what happened
- Configuration: Your configuration settings (redact sensitive info)
Please use the issue template when submitting a bug report.
We welcome feature suggestions! Feature requests should include:
- Clear Description: Describe the feature and its benefits
- Use Case: Explain how it would be used
- Alternatives: Any alternative solutions you've considered
- Fork the Repository: Fork the project to your GitHub account
- Create a Branch: Create a feature branch for your work
- Write Code: Write your code, following our code style
- Write Tests: Add tests for your changes
- Submit a Pull Request: Submit a PR against the main branch
For setting up the database, please refer to the following guides:
- MySQL Setup: docs/setup-guide-mysql.md
- PostgreSQL Setup: docs/setup-guide-postgres.md
# Clone your fork
git clone https://github.com/your-username/decision-engine.git
cd Decision Engine
# Add the upstream repository
git remote add upstream https://github.com/project-owner/decision-engine.git
# Create a branch
git checkout -b feature/your-feature-name
# Install development dependencies
cargo install cargo-watch cargo-insta cargo-audit
# Run tests
cargo test
# Run specific tests
cargo test routing_test
# Run with auto-reload for development
cargo watch -x runWe follow Rust's official style guidelines:
- Run
cargo fmtbefore committing - Run
cargo clippyto catch common mistakes - Aim for clear, idiomatic Rust code
- Document your public API with doc comments
- Use the imperative mood ("Add feature" not "Added feature")
- First line is a summary (50 chars or less)
- Include relevant issue numbers (e.g., "Fix #42: Add success rate validation")
- Be descriptive about what and why, not how
- Ensure your code passes all tests
- Update documentation if needed
- Update the CHANGELOG.md if appropriate
- Ensure the PR description clearly describes the problem and solution
- Include any issue numbers in the PR description
Your PR will be reviewed by maintainers who may request changes.
- Write unit tests for new functionality
- Ensure all tests pass before submitting PRs
- Consider adding integration tests for complex features
- Update documentation for new features or changes
- Write clear, concise doc comments for public APIs
- Update examples if appropriate
Maintainers will handle the release process, which includes:
- Updating version numbers
- Creating changelog entries
- Creating GitHub releases
- Publishing to registries
If you need help, you can:
- Open a discussion on GitHub
- Ask in our community chat
- Check the documentation
All contributors will be recognized in our README and CONTRIBUTORS file.
Thank you for contributing to Decision Engine!