-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (39 loc) · 1.46 KB
/
Makefile
File metadata and controls
45 lines (39 loc) · 1.46 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
.PHONY: test test-cov test-cov-xml help install clean
# Default target
help:
@echo "Available targets:"
@echo " test - Run tests without coverage"
@echo " test-cov - Run tests with coverage and generate HTML report"
@echo " test-cov-xml - Run tests with coverage and generate XML report"
@echo " install - Install dependencies with test extras"
@echo " clean - Clean coverage files and cache"
# Install dependencies
install:
uv sync --extra test
# Run tests without coverage
test: install
@echo "Running tests..."
uv run pytest -v
# Run tests with coverage and generate HTML report
test-cov: install
@echo "Running tests with coverage..."
uv run pytest --cov=src/tracksdata --cov-report=html --cov-report=term-missing -v
@echo ""
@echo "Coverage report generated in htmlcov/index.html"
@echo "You can open it with: open htmlcov/index.html (macOS) or xdg-open htmlcov/index.html (Linux)"
# Run tests with coverage and generate XML report
test-cov-xml: install
@echo "Running tests with coverage (XML output)..."
uv run pytest --cov=src/tracksdata --cov-report=xml --cov-report=term-missing -v
@echo ""
@echo "Coverage report generated in coverage.xml"
# Clean coverage files and cache
clean:
@echo "Cleaning coverage files and cache..."
rm -rf htmlcov/
rm -f coverage.xml
rm -f .coverage
rm -rf .pytest_cache/
rm -rf src/**/__pycache__/
find . -name "*.pyc" -delete
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true