-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (45 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
56 lines (45 loc) · 1.67 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
.DEFAULT_GOAL := help
SHELL := /bin/bash
PY := python3.13
VENV := backend/.venv
VENV_PY := $(VENV)/bin/python
.PHONY: help
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
.PHONY: venv
venv: ## Create backend virtualenv and install dev deps
$(PY) -m venv $(VENV)
$(VENV_PY) -m pip install --upgrade pip
$(VENV_PY) -m pip install -r backend/requirements.txt -r backend/requirements-dev.txt
.PHONY: test
test: ## Run backend unit tests (no Neo4j required)
cd backend && .venv/bin/pytest -q
.PHONY: test-integration
test-integration: ## Run all tests incl. Neo4j-backed integration tests (needs Neo4j up)
cd backend && RUN_NEO4J_TESTS=1 .venv/bin/pytest -q
.PHONY: lint
lint: ## Type/lint check the backend (best-effort)
cd backend && .venv/bin/python -m compileall -q app
.PHONY: up
up: ## Build and start the full stack (neo4j + backend + frontend)
docker compose up --build -d
.PHONY: down
down: ## Stop the stack
docker compose down
.PHONY: logs
logs: ## Tail stack logs
docker compose logs -f
.PHONY: demo
demo: up ## Start the stack and print the demo URLs
@echo ""
@echo "EKG-DFAM PoC is starting. Give Neo4j ~20-30s on first run, then open:"
@echo " Frontend (demo UI): http://localhost:8080"
@echo " Backend API docs: http://localhost:8000/docs"
@echo " Neo4j Browser: http://localhost:7474 (user: neo4j / pass: ekgdfampoc)"
@echo ""
@echo "Tail logs with: make logs"
.PHONY: clean
clean: ## Remove venv, caches and stop/destroy the stack + volumes
docker compose down -v || true
rm -rf $(VENV) backend/.pytest_cache backend/**/__pycache__