Thank you for your interest in contributing to llm-service! This document provides guidelines and information for contributors.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and professional in all interactions.
- Python 3.10 or higher
- uv package manager
- Git
- 
Fork the repository 
- 
Clone your fork: git clone https://github.com/yourusername/llm-service.git cd llm-service
- 
Install dependencies: uv sync --extra develop 
- 
Install pre-commit hooks: uv run pre-commit install 
- 
Create a new branch for your feature or bugfix: git checkout -b feature/your-feature-name 
- 
Make your changes following the coding standards below 
- 
Run tests and linting: uv run pre-commit run --all-files uv run pytest 
- 
Commit your changes with a signed-off commit: git commit -s -m "Your commit message"The -sflag adds a "Signed-off-by" line to your commit, which is required for this project (Developer Certificate of Origin).
- 
Push to your fork and create a pull request 
- Follow PEP 8 style guidelines (enforced by ruff)
- Use type hints for all function parameters and return values
- Write docstrings for all public functions and classes
- Keep line length to 80 characters (enforced by ruff)
- Use regex instead of re module (enforced by pre-commit hook)
We use several tools to maintain code quality:
- ruff: Linting and code formatting
- mypy: Static type checking
- pytest: Testing framework
- pre-commit: Git hooks for code quality checks
All tools are configured in pyproject.toml and .pre-commit-config.yaml.
- Write tests for new functionality
- Ensure all tests pass before submitting a PR
- Aim for good test coverage
- Use descriptive test names and docstrings
Run tests with:
uv run pytest- Update documentation for any new features or API changes
- Add docstrings to new functions and classes
- Update the README if needed
- Check documentation builds correctly
- Ensure your PR description clearly describes the problem and solution
- Include relevant issue numbers if applicable
- Make sure all status checks pass
- Request review from maintainers
- Address any feedback promptly
- All tests pass
- Code follows style guidelines
- Documentation updated if needed
- Commits are signed off (DCO)
- PR template is filled out completely
When creating issues:
- Use the appropriate issue template
- Provide clear, detailed descriptions
- Include reproduction steps for bugs
- Add relevant labels
- Search for existing issues first
If you discover a security vulnerability, please report it privately through GitHub's security advisory feature rather than creating a public issue.
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
If you have questions about contributing, feel free to:
- Open a discussion on GitHub
- Ask in the issue comments
- Contact the maintainers
Thank you for contributing to llm-service!