This document describes the standard development workflow for contributing to TimeTrack.
| Task | Command |
|---|---|
| Format code | black app tests && isort app tests |
| Check formatting | black --check app tests && isort --check-only app tests |
| Type check | mypy app |
| Run tests | pytest tests/ -v |
| Run app | flask run or python run.py |
# Clone the repository
git clone <repo-url>
cd TimeTrack
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows PowerShell:
.venv\Scripts\Activate.ps1
# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt- Make your changes in
app/ - Add type hints to all new functions
- Write tests in
tests/for new functionality
Run these before every commit:
# Format code
black app tests
isort app tests
# Type checking
mypy app
# Run tests
pytest tests/ -v- Code formatted with black
- Imports sorted with isort
- mypy passes without errors
- All tests pass
- New tests added for new functionality