Thank you for your interest in contributing to TempoEval! π
-
Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/tempoeval.git cd tempoeval -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install in development mode
pip install -e ".[dev]" -
Install pre-commit hooks (optional but recommended)
pip install pre-commit pre-commit install
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=tempoeval --cov-report=html
# Run specific test file
pytest tests/test_core.py -v- Check existing issues to avoid duplicates
- Create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Python version and OS
- Minimal code example if possible
- Open a discussion or issue describing:
- The problem you're trying to solve
- Your proposed solution
- Alternative approaches considered
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Follow the code style (we use Black for formatting)
- Add tests for new functionality
- Update documentation if needed
-
Run tests locally
pytest tests/ -v
-
Commit your changes
git commit -m "feat: add amazing feature"We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation onlytest:- Adding testsrefactor:- Code refactoring
-
Push and create PR
git push origin feature/amazing-feature
- Formatting: We use Black with line length 120
- Imports: Sorted with isort
- Linting: Ruff for fast linting
- Type hints: Encouraged for public APIs
# Format code
black tempoeval/ --line-length=120
isort tempoeval/
# Check linting
ruff check tempoeval/tempoeval/
βββ core/ # Core classes (FocusTime, Evaluator, etc.)
βββ metrics/ # All temporal metrics
β βββ retrieval/ # Layer 1: Retrieval metrics
β βββ generation/ # Layer 2: Generation metrics
β βββ reasoning/ # Layer 3: Reasoning metrics
β βββ composite/ # TempoScore
βββ llm/ # LLM provider integrations
βββ datasets/ # Dataset loaders
βββ guidance/ # Temporal guidance generation
βββ efficiency/ # Cost & latency tracking
βββ utils/ # Utility functions
- Create metric file in appropriate directory (
metrics/retrieval/, etc.) - Inherit from base class (
BaseRetrievalMetric,BaseGenerationMetric, etc.) - Implement required methods:
compute()- Synchronous computationacompute()- Async computation (if LLM-based)
- Add to exports in
__init__.py - Write tests in
tests/ - Add documentation
Example:
from tempoeval.core.base import BaseRetrievalMetric
class MyNewMetric(BaseRetrievalMetric):
name = "my_new_metric"
requires_llm = False
def compute(self, **kwargs) -> float:
# Implementation
return score- Documentation is built with MkDocs
- API docs are auto-generated from docstrings
- Update
docs/for new features
# Preview documentation locally
mkdocs serveEvery contribution, no matter how small, helps make TempoEval better for everyone. We appreciate your time and effort!
Questions? Open an issue or reach out to the maintainers.