-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.49 KB
/
Makefile
File metadata and controls
55 lines (43 loc) · 1.49 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
.PHONY: test lint check structural security clean install fix lines preflight release-guard mcp
# Install SDK in editable mode with dev tools
install:
pip install -e ./sdk
pip install pytest pytest-cov ruff
# Run full test suite with coverage
test:
python -m pytest sdk/tests/ -v \
--cov=agentguard \
--cov-report=term-missing \
--cov-fail-under=80
# Run only structural/architectural invariant tests
structural:
python -m pytest sdk/tests/test_architecture.py -v
# Lint SDK source
lint:
ruff check sdk/agentguard/ scripts/generate_pypi_readme.py scripts/sdk_preflight.py scripts/sdk_release_guard.py
# Lint + auto-fix
fix:
ruff check sdk/agentguard/ --fix
# Lint + full test suite (mirrors CI)
check: lint test mcp
# Fast local feedback based on changed files
preflight:
python scripts/sdk_preflight.py
# Validate release metadata and doc markers stay aligned
release-guard:
python scripts/sdk_release_guard.py
# Build and test the MCP server
mcp:
npm --prefix mcp-server test
# Security lint (bandit)
security:
bandit -r sdk/agentguard/ -s B101,B110,B112,B311 -q
# Clean build artifacts
clean:
rm -rf sdk/dist/ sdk/build/ sdk/*.egg-info sdk/agentguard/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true
# Show line counts per module (entropy check)
lines:
@echo "=== Module Line Counts ==="
@wc -l sdk/agentguard/*.py sdk/agentguard/sinks/*.py sdk/agentguard/integrations/*.py | sort -n