Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (58 loc) · 1.8 KB
/
Copy pathMakefile
File metadata and controls
82 lines (58 loc) · 1.8 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
74
75
76
77
78
79
80
81
82
.PHONY: install install-backend install-frontend build build-frontend dev dev-backend dev-frontend demo test test-unit test-integration test-db test-capture test-network test-install test-cli test-web test-mcp test-e2e coverage lint format clean
# Setup
install: install-backend install-frontend
install-backend:
pip install -r requirements-dev.txt
pip install -e .
install-frontend:
cd frontend && npm install
# Build (the built UI is committed to mcphawk/web/static)
build: build-frontend
python -m build
build-frontend:
cd frontend && npm run build
# Development: API on 8484, Vite with hot reload on 5173
dev:
@make -j 2 dev-backend dev-frontend
dev-backend:
mcphawk up
dev-frontend:
cd frontend && npm run dev
# Generate realistic demo traffic into the default database
demo:
python examples/demo/run_demo.py
# Tests
test:
python -m pytest -v
test-unit:
python -m pytest tests/unit -v
test-integration:
python -m pytest tests/integration -v
test-db:
python -m pytest tests/integration/db -v
test-capture:
python -m pytest tests/integration/capture -v
test-network:
python -m pytest tests/integration/network -v
test-install:
python -m pytest tests/integration/install -v
test-cli:
python -m pytest tests/integration/cli -v
test-web:
python -m pytest tests/integration/web -v
test-mcp:
python -m pytest tests/integration/mcp -v
test-e2e:
python -m pytest tests/integration/e2e -v
# Coverage (fails under 85%, see pyproject.toml)
coverage:
python -m pytest --cov=mcphawk --cov-report=html --cov-report=term --cov-report=xml
# Code quality
lint:
ruff check .
format:
ruff check . --fix
clean:
rm -rf frontend/node_modules build dist *.egg-info htmlcov .coverage coverage.xml
find . -type d -name __pycache__ -prune -exec rm -rf {} +
find . -type d -name .pytest_cache -prune -exec rm -rf {} +