-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (58 loc) · 1.72 KB
/
Makefile
File metadata and controls
72 lines (58 loc) · 1.72 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
# Makefile for Assured Sentinel
# Provides common development commands
.PHONY: help install demo calibrate dashboard test lint clean
# Default target
help:
@echo "Assured Sentinel - Available Commands"
@echo "======================================"
@echo ""
@echo " make install - Install dependencies"
@echo " make demo - Run offline demo (no API key needed)"
@echo " make calibrate - Run calibration to generate threshold"
@echo " make dashboard - Launch Streamlit dashboard"
@echo " make test - Run unit tests"
@echo " make lint - Run linting (flake8)"
@echo " make clean - Remove generated files"
@echo ""
# Install dependencies
install:
pip install -r requirements.txt
# Run offline demo (no API key required)
demo:
python demo.py
# Run calibration
calibrate:
python calibration.py
# Launch dashboard
dashboard:
python -m streamlit run dashboard.py
# Run with LLM (requires Azure OpenAI)
run:
python run_day5.py
# Run tests
test:
pytest tests/ -v
# Run tests with coverage
test-cov:
pytest tests/ --cov=. --cov-report=term-missing --cov-report=html
# Lint code
lint:
flake8 *.py tests/ --max-line-length=120 --ignore=E501,W503
# Type checking (if mypy is installed)
typecheck:
mypy *.py --ignore-missing-imports
# Clean generated files
clean:
rm -f calibration_data.pkl
rm -rf __pycache__
rm -rf .pytest_cache
rm -rf htmlcov
rm -rf .coverage
find . -name "*.pyc" -delete
find . -name "__pycache__" -type d -delete
# Full CI check (lint + test)
ci: lint test
@echo "CI checks passed!"
# Quick verification of a code snippet (usage: make verify CODE="print('hello')")
verify:
@python -c "from commander import Commander; c = Commander(); print(c.verify('''$(CODE)'''))"