-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (61 loc) · 1.84 KB
/
Makefile
File metadata and controls
73 lines (61 loc) · 1.84 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.PHONY: help install lint format type-check test check clean
help:
@echo "EuroCV Development Commands"
@echo "=========================="
@echo ""
@echo "Setup:"
@echo " make install Install dependencies and pre-commit hooks"
@echo ""
@echo "Checks (same as CI):"
@echo " make check Run all checks (lint, format, type, test)"
@echo " make lint Run ruff linter"
@echo " make format Run ruff formatter"
@echo " make type-check Run mypy type checker"
@echo " make test Run pytest tests"
@echo ""
@echo "Git:"
@echo " make pre-commit Run pre-commit on all files"
@echo ""
@echo "Cleanup:"
@echo " make clean Remove build artifacts"
install:
@echo "📦 Installing dependencies..."
uv pip install -e ".[dev]"
@echo "🔧 Installing pre-commit hooks..."
pre-commit install
@echo "✅ Setup complete!"
lint:
@echo "🔍 Running ruff linter..."
ruff check src/
lint-fix:
@echo "🔧 Running ruff linter with auto-fix..."
ruff check src/ --fix
format:
@echo "✨ Running ruff formatter..."
ruff format src/
format-check:
@echo "✨ Checking ruff formatting..."
ruff format --check src/
type-check:
@echo "🔎 Running mypy type checker..."
mypy src/
test:
@echo "🧪 Running pytest..."
pytest --cov=eurocv --cov-report=term
test-fast:
@echo "🧪 Running pytest (fast, no coverage)..."
pytest -x
# Run all checks (same as GitHub Actions)
check: lint format-check type-check test
@echo ""
@echo "✅ All checks passed! Same as CI would run."
# Run pre-commit on all files
pre-commit:
@echo "🔧 Running pre-commit hooks..."
pre-commit run --all-files
clean:
@echo "🧹 Cleaning up..."
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
@echo "✅ Clean!"