Thank you for your interest in contributing to vLLM Router! This document provides guidelines and instructions for contributors.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/mvllm.git cd mvllm -
Set up the development environment:
# Install dependencies uv sync # Install development dependencies uv add --dev pytest pytest-asyncio httpx black isort flake8
-
Create a virtual environment (if not using uv):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements-dev.txt
We follow Python code style guidelines:
- Code formatting: Use
blackfor code formatting - Import sorting: Use
isortfor import organization - Linting: Use
flake8for linting - Type hints: Use type hints where appropriate
# Format code
black app/
isort app/
# Lint code
flake8 app/
# Run tests
uv run pytest
# Run all quality checks
uv run pytest && black --check app/ && isort --check-only app/ && flake8 app/# Run all tests
uv run pytest
# Run specific test file
uv run pytest test.py
# Run with coverage
uv run pytest --cov=app
# Run tests with verbose output
uv run pytest -vWe aim to maintain high test coverage. New features should include appropriate tests.
-
Create a feature branch:
git checkout -b feature-name
-
Make your changes and ensure they pass all tests
-
Commit your changes with a clear message:
git commit -m "Add feature: description of changes" -
Push to your fork:
git push origin feature-name
-
Create a Pull Request to the main repository
- Title: Use a clear and descriptive title
- Description: Provide a detailed description of changes
- Tests: Ensure all tests pass
- Documentation: Update documentation as needed
- Breaking Changes: Clearly indicate any breaking changes
- All pull requests must be reviewed by at least one maintainer
- Continuous Integration (CI) must pass
- Code quality checks must pass
- Tests must pass with adequate coverage
When reporting issues, please include:
- Bug reports: Steps to reproduce, expected behavior, actual behavior
- Feature requests: Clear description of the requested feature
- Environment: Python version, OS, relevant dependencies
- Modularity: Keep components loosely coupled
- Async/Await: Use async patterns throughout
- Error Handling: Provide meaningful error messages
- Logging: Use structured logging
- Configuration: Support configuration via environment variables and files
- Follow RESTful principles
- Use appropriate HTTP status codes
- Provide clear error responses
- Include API documentation
- Minimize blocking operations
- Use connection pooling
- Implement proper caching strategies
- Monitor resource usage
- Never commit secrets or API keys
- Validate all input data
- Use HTTPS in production
- Implement proper authentication/authorization
- Keep dependencies updated
- Keep README up to date
- Document public APIs
- Include examples for complex features
- Maintain changelog for significant changes
Thank you for contributing to vLLM Router! 🚀