Contributing to SMG¶
Thank you for your interest in contributing to Shepherd Model Gateway! This guide will help you get started.
Ways to Contribute¶
-
Report Bugs
Found a bug? Open an issue with a clear description, steps to reproduce, and expected vs actual behavior.
-
Suggest Features
Have an idea? Open a feature request describing the problem you're solving and your proposed solution.
-
Contribute Code
Ready to code? Follow our development guide to set up your environment and submit a pull request.
-
Improve Docs
Documentation improvements are always welcome! Fix typos, clarify explanations, or add examples.
Quick Start¶
1. Fork and Clone¶
2. Set Up Development Environment¶
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build the project
cargo build
# Run tests
cargo test
3. Make Changes¶
# Create a branch
git checkout -b feature/my-feature
# Make your changes
# ...
# Run tests and linting
cargo test
cargo clippy
cargo fmt --check
4. Submit a Pull Request¶
Contribution Guidelines¶
Code Quality¶
- All tests pass (
cargo test) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy) - New code has tests
- Documentation updated if needed
Commit Messages¶
Follow conventional commit format:
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat(routing): add weighted round-robin policy
fix(health): handle timeout in health checks
docs(readme): update installation instructions
Pull Request Process¶
- Open draft PR early for complex changes to get feedback
- Link related issues using "Fixes #123" or "Relates to #123"
- Update documentation for user-facing changes
- Add tests for new functionality
- Keep PRs focused - one feature or fix per PR
Getting Help¶
- Questions: Open a GitHub Discussion
- Bugs: Open an Issue
- Chat: Join our community on Discord or Slack
Code of Conduct¶
We are committed to providing a welcoming and inclusive environment. Please read and follow our Code of Conduct.
License¶
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.