forked from aegra/aegra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (53 loc) · 1.83 KB
/
Copy pathMakefile
File metadata and controls
66 lines (53 loc) · 1.83 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
.PHONY: help install dev-install setup-hooks format lint type-check security test test-cov clean run ci-check
help:
@echo "Available commands:"
@echo " make install - Install production dependencies"
@echo " make dev-install - Install dev dependencies + git hooks"
@echo " make setup-hooks - Reinstall git hooks (if needed)"
@echo " make format - Format code with ruff"
@echo " make lint - Lint code with ruff"
@echo " make type-check - Run mypy type checking"
@echo " make security - Run security checks with bandit"
@echo " make test - Run tests"
@echo " make test-cov - Run tests with coverage"
@echo " make ci-check - Run all CI checks locally"
@echo " make clean - Clean cache files"
@echo " make run - Run the server"
install:
uv sync --no-dev
dev-install:
uv sync
@uv run pre-commit install
@uv run pre-commit install --hook-type commit-msg
@echo ""
@echo "✅ Dependencies installed!"
@echo "✅ Git hooks installed!"
@echo "🚀 You're ready to develop!"
setup-hooks:
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
@echo ""
@echo "✅ Git hooks reinstalled!"
@echo "📝 Your commits will now be checked automatically"
format:
uv run ruff format .
uv run ruff check --fix .
lint:
uv run ruff check .
type-check:
uv run mypy src/
security:
uv run bandit -c pyproject.toml -r src/
test:
uv run pytest
test-cov:
uv run pytest --cov=src --cov-report=html --cov-report=term
ci-check: format lint type-check security test
@echo ""
@echo "✅ All CI checks passed!"
clean:
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
rm -rf .pytest_cache .mypy_cache .ruff_cache htmlcov 2>/dev/null || true
run:
uv run python run_server.py