-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (41 loc) · 1.69 KB
/
Makefile
File metadata and controls
56 lines (41 loc) · 1.69 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
.PHONY: help install install-cli test e2e lint lint-py lint-fe clean build-dev build-prod run-dev run-prod docker-falkordb docker-stop
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install all dependencies (backend + frontend)
uv sync --all-extras
npm install --prefix ./app
install-cli: ## Install cgraph CLI entry point
uv pip install -e .
build-dev: ## Build frontend for development
npm --prefix ./app run build:dev
build-prod: ## Build frontend for production
npm --prefix ./app run build
test: ## Run backend tests
uv run python -m pytest tests/ --verbose
e2e: ## Run end-to-end Playwright tests
npx playwright test
lint: lint-py lint-fe ## Run all linters
lint-py: ## Run Python linting (ruff)
uv run ruff check .
lint-fe: ## Run frontend linting (TypeScript)
npm --prefix ./app run lint
clean: ## Clean up build and test artifacts
rm -rf app/dist/
rm -rf test-results/
rm -rf playwright-report/
rm -rf .pytest_cache/
rm -rf __pycache__/
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
run-dev: build-dev ## Run development server (Python backend serving built frontend)
uv run uvicorn api.index:app --host $${HOST:-127.0.0.1} --port $${PORT:-5000} --reload
run-prod: build-prod ## Run production server
uv run uvicorn api.index:app --host $${HOST:-0.0.0.0} --port $${PORT:-5000}
docker-falkordb: ## Start FalkorDB in Docker for testing
docker run -d --name falkordb-test -p 6379:6379 falkordb/falkordb:latest
docker-stop: ## Stop test containers
docker stop falkordb-test || true
docker rm falkordb-test || true