Development Setup
Prerequisites
- Python 3.13 (required)
- uv package manager (recommended)
- Git for version control
- GitHub account for contributions
Clone Repository
Install Dependencies
Using uv (recommended):Run Development Server
http://localhost:5000.
Code Quality Requirements
Code Formatting (ruff)
Format code:Linting (ruff)
Run linter:Type Checking (mypy)
Run type checker:- Strict mode enabled - All type hints required
- No implicit optional - Be explicit with
Type | None - Complete coverage - All functions must have type hints
Run All Quality Checks
Combined command:Testing
Test Coverage Requirement
Minimum coverage: 90% (enforced by CI) Run tests with coverage:Running Tests
Run all tests:Writing Tests
Test file structure:Test Best Practices
- Use fixtures for common test setup
- Mock external dependencies (GitHub API, file system)
- Test both success and failure paths
- Use
@pytest.mark.asynciofor async tests - Keep tests fast - Use mocks instead of real API calls
- Test edge cases - Empty data, None values, exceptions
Pre-commit Hooks
Installation
Install pre-commit:Hooks Configuration
The repository uses these pre-commit hooks:- ruff - Code formatting and linting
- mypy - Type checking
- flake8 - Additional linting
- detect-secrets - Prevent committing secrets
- gitleaks - Security scanning
- trailing-whitespace - Remove trailing whitespace
- end-of-file-fixer - Ensure files end with newline
- check-yaml - Validate YAML files
- check-ast - Validate Python syntax
Running Hooks Manually
Run on all files:Development Workflow
Making Changes
-
Create feature branch:
- Make changes following code style guidelines
-
Run quality checks:
-
Commit changes:
Pre-commit hooks will run automatically.
-
Push to GitHub:
- Create Pull Request on GitHub
Commit Message Guidelines
Format:feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions or changeschore:- Build/tooling changesperf:- Performance improvements
Pull Request Checklist
Before submitting a PR, ensure:- ✅ Code formatted with
ruff format - ✅ Linting passes with
ruff check - ✅ Type checking passes with
mypy - ✅ Tests pass with 90%+ coverage
- ✅ Pre-commit hooks pass
- ✅ Documentation updated if needed
- ✅ Commit messages follow guidelines
- ✅ No secrets committed
- ✅ CHANGELOG updated for user-facing changes
Architecture Guidelines
Code Organization
Handler Pattern
Create new handler:Async/Await Requirements
CRITICAL: PyGithub is synchronous - MUST wrap withasyncio.to_thread()
Type Hints
Always include complete type hints:Logging Pattern
Error Handling
Documentation
Docstring Format
Use Google-style docstrings:README and Examples
- Update README.md for user-facing features
- Add examples to examples/ directory
- Update configuration schema documentation
- Include real-world use cases
Release Process
-
Update version in
pyproject.toml - Update CHANGELOG.md with changes
-
Create git tag:
-
GitHub Actions will automatically:
- Run tests
- Build container image
- Push to GitHub Container Registry
Getting Help
- Documentation: README.md
- Issues: GitHub Issues
- Development Guide: CLAUDE.md
Next Steps
Monitoring
Set up monitoring and alerts
Troubleshooting
Debug common issues