Contributing¶
Overview¶
We welcome contributions to the Claude Code Proxy API! This guide will help you get started.
Development Setup¶
-
Clone the repository
-
Set up development environment
-
Install pre-commit hooks
Code Quality¶
Before submitting changes, ensure your code passes all quality checks:
# Format code
ruff format .
# Lint code
ruff check .
# Type checking
mypy .
# Run tests
pytest
# Run all checks
ruff format . && ruff check . && mypy . && pytest
Pull Request Process¶
-
Create a feature branch
-
Make your changes
- Write tests for new functionality
- Update documentation if needed
-
Follow existing code patterns
-
Commit your changes
-
Push and create PR
Code Standards¶
- Python 3.11+ compatibility
- Type hints for all functions and methods
- Docstrings for all public APIs
- Tests for all new functionality
- ruff formatting and linting
- mypy type checking
Commit Messages¶
Use conventional commits:
- feat:
- New features
- fix:
- Bug fixes
- docs:
- Documentation updates
- test:
- Test updates
- refactor:
- Code refactoring
- chore:
- Maintenance tasks
Testing¶
- Write unit tests for new functionality
- Use appropriate pytest markers
- Ensure tests pass in CI/CD
- Maintain test coverage above 80%
Documentation¶
- Update relevant documentation
- Add examples for new features
- Update API reference if needed
- Test documentation builds locally