This repository was archived by the owner on Jul 8, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (78 loc) · 3 KB
/
Copy pathMakefile
File metadata and controls
97 lines (78 loc) · 3 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# =============================================================================
# Agent Kernel Makefile
# =============================================================================
.PHONY: help install install-dev lint format typecheck test test-unit test-cov clean init run
# Default target
help:
@echo "Agent Kernel - Available Commands"
@echo ""
@echo "Setup:"
@echo " make install Install production dependencies"
@echo " make install-dev Install development dependencies"
@echo " make init Initialize database and directories"
@echo ""
@echo "Development:"
@echo " make lint Run linting (ruff)"
@echo " make format Format code (ruff format)"
@echo " make typecheck Run type checking (mypy)"
@echo " make test Run all tests"
@echo " make test-unit Run unit tests only"
@echo " make test-cov Run tests with coverage"
@echo ""
@echo "Running:"
@echo " make run Run the CLI (show help)"
@echo " make daily Run daily check-in workflow"
@echo ""
@echo "Maintenance:"
@echo " make clean Remove build artifacts"
@echo " make clean-data Remove local data (traces, db)"
# =============================================================================
# Setup
# =============================================================================
install:
uv pip install -e .
install-dev:
uv pip install -e ".[dev]"
pre-commit install || true
init:
@echo "Initializing Agent Kernel..."
@mkdir -p data/traces data/documents data/events data/chroma
@if [ ! -f .env ]; then cp .env.example .env && echo "Created .env from template"; fi
@echo "Running database migrations..."
agent-kernel init || echo "CLI not yet available - skipping init command"
@echo "Done! Edit .env with your credentials."
# =============================================================================
# Development
# =============================================================================
lint:
ruff check src/ tests/
format:
ruff format src/ tests/
ruff check --fix src/ tests/
typecheck:
mypy src/
test:
pytest tests/ -v
test-unit:
pytest tests/unit/ -v
test-cov:
pytest tests/ --cov=src/agent_kernel --cov-report=html --cov-report=term
@echo "Coverage report: htmlcov/index.html"
# =============================================================================
# Running
# =============================================================================
run:
agent-kernel --help
daily:
agent-kernel run-workflow daily_checkin
# =============================================================================
# Maintenance
# =============================================================================
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache .mypy_cache .ruff_cache htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
clean-data:
@echo "Warning: This will delete all local data!"
@read -p "Are you sure? [y/N] " confirm && [ "$$confirm" = "y" ] || exit 1
rm -rf data/