-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (46 loc) Β· 1.32 KB
/
Makefile
File metadata and controls
56 lines (46 loc) Β· 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: check format lint typecheck test clean coverage coverage-html install
# Default target
all: check
install:
@echo "π§ Installing dependencies..."
uv sync --all-extras
# Format code
format:
@echo "π¨ Formatting code..."
uv run black .
uv run isort .
# Run linter
lint:
@echo "π Running linter..."
uv run ruff check .
# Run type checker
typecheck:
@echo "π Running type checker..."
uv run mypy src
# Run tests
test:
@echo "π§ͺ Running tests..."
uv run pytest -v
# Run tests with coverage
coverage:
@echo "π Running tests with coverage..."
uv run pytest -v --cov=src --cov-report=term-missing
# Generate HTML coverage report
coverage-html:
@echo "π Generating HTML coverage report..."
uv run pytest -v --cov=src --cov-report=html
@echo "β¨ Coverage report generated in htmlcov/index.html"
# Run all checks
check: format lint typecheck test
@echo "β¨ All checks passed!"
# Clean up cache files
clean:
@echo "π§Ή Cleaning up..."
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type d -name ".pytest_cache" -exec rm -r {} +
find . -type d -name ".mypy_cache" -exec rm -r {} +
find . -type d -name ".ruff_cache" -exec rm -r {} +
find . -type d -name "htmlcov" -exec rm -r {} +
find . -type f -name "*.pyc" -delete
find . -type f -name ".coverage" -delete
@echo "β¨ Cleanup complete!"