Contributing¶
Thank you for your interest in contributing to Compere!
Development Setup¶
- Fork the repository on GitHub
- Clone your fork:
- Install dependencies:
- Create a branch:
Code Style¶
We use ruff for linting and formatting.
Check Code¶
Format Code¶
Configuration¶
Ruff is configured in pyproject.toml:
- Line length: 120
- Target: Python 3.11
- Rules: E, W, F, I, B, C4, UP
Testing¶
Run Tests¶
# All tests
uv run pytest
# With coverage
uv run pytest --cov=compere --cov-report=html
# Specific file
uv run pytest tests/test_api.py
# Verbose output
uv run pytest -v
Write Tests¶
- Place tests in the
tests/directory - Name test files
test_*.py - Name test functions
test_* - Use pytest fixtures for setup
Pull Request Process¶
- Update documentation for any new features
- Add tests for new functionality
- Run the test suite and ensure all tests pass
- Run linting and fix any issues
- Write a clear PR description
PR Title Format¶
Use conventional commits:
feat:New featuresfix:Bug fixesdocs:Documentationtest:Testsrefactor:Code refactoringchore:Maintenance tasks
PR Description Template¶
## Summary
Brief description of changes
## Changes
- Change 1
- Change 2
## Testing
How to test these changes
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Linting passes
Commit Messages¶
Write clear, concise commit messages:
feat: add entity search functionality
- Add search parameter to list_entities endpoint
- Update tests for search functionality
- Add documentation for search feature
Code Review¶
All PRs require review before merging. Reviewers will check:
- Code quality and style
- Test coverage
- Documentation
- Backwards compatibility
Reporting Issues¶
Bug Reports¶
Include:
- Compere version
- Python version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Full error message/stack trace
Feature Requests¶
Include:
- Use case description
- Proposed solution
- Alternatives considered
Questions?¶
- Open a GitHub Discussion
- Check existing issues first
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.