-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (32 loc) · 2.12 KB
/
Makefile
File metadata and controls
47 lines (32 loc) · 2.12 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
# ─────────────────────────────────────────────────────
# CortexOS — Makefile
# Common development commands for the monorepo.
# ─────────────────────────────────────────────────────
.PHONY: help install lint test test-python test-swift security serve clean
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
# ── Setup ───────────────────────────────────────────
install: ## Install Python deps into .venv
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
# ── Linting & Security ─────────────────────────────
lint: ## Run ruff lint + format check
.venv/bin/ruff check cortex_core/ tests/ scripts/
.venv/bin/ruff format --check cortex_core/ tests/ scripts/
security: ## Run bandit security scan
.venv/bin/bandit -r cortex_core/ -ll -q --skip B104
# ── Tests ───────────────────────────────────────────
test: test-python test-swift ## Run all tests
test-python: ## Run Python unit tests
.venv/bin/python -m pytest tests/ -v --tb=short
test-swift: ## Build & test Swift package
swift test
# ── Server ──────────────────────────────────────────
serve: ## Start the CortexOS API server
.venv/bin/python -m cortex_core.api.server
# ── Clean ───────────────────────────────────────────
clean: ## Remove build artifacts
rm -rf .venv .build .pytest_cache __pycache__ .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true