-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (69 loc) · 3.2 KB
/
Copy pathMakefile
File metadata and controls
97 lines (69 loc) · 3.2 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
.PHONY: help install test test-unit test-e2e test-e2e-headed lint format clean setup-dev build lint-frontend test-sdk docker-test-services docker-test-stop build-package
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install dependencies
uv sync
npm ci --prefix ./app
setup-dev: install ## Set up development environment
uv run playwright install chromium
uv run playwright install-deps
@echo "Development environment setup complete!"
@echo "Don't forget to copy .env.example to .env and configure your settings"
build-dev:
npm --prefix ./app run build:dev
build-prod:
npm --prefix ./app run build
build-package: ## Build distributable package (wheel + sdist)
uv build
@echo "Built packages in dist/"
test: build-dev test-unit test-e2e ## Run all tests
test-unit: ## Run unit tests only (excludes SDK and E2E tests)
uv run python -m pytest tests/ -k "not e2e and not test_sdk" --ignore=tests/test_sdk --verbose
test-e2e: build-dev ## Run E2E tests headless
uv run python -m pytest tests/e2e/ --browser chromium --video=on --screenshot=on
test-e2e-headed: build-dev ## Run E2E tests with browser visible
uv run python -m pytest tests/e2e/ --browser chromium --headed
test-e2e-debug: build-dev ## Run E2E tests with debugging enabled
uv run python -m pytest tests/e2e/ --browser chromium --slowmo=1000
lint: ## Run linting (backend + frontend)
@echo "Running backend lint (pylint)"
uv run python -m pylint $(shell git ls-files '*.py')
@echo "Running frontend lint (eslint)"
make lint-frontend
lint-frontend: ## Run frontend lint (ESLint)
npm --prefix ./app run lint
format: ## Format code (placeholder - add black/autopep8 if needed)
@echo "Add code formatting tool like black here"
clean: ## Clean up test artifacts
rm -rf test-results/
rm -rf playwright-report/
rm -rf tests/e2e/screenshots/
rm -rf __pycache__/
rm -rf dist/
rm -rf *.egg-info/
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
run-dev: build-dev ## Run development server
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
# SDK Testing
docker-test-services: ## Start all test services (FalkorDB + PostgreSQL + MySQL)
docker compose -f docker-compose.test.yml up -d
@echo "Waiting for services to be ready..."
@sleep 10
docker-test-stop: ## Stop all test services
docker compose -f docker-compose.test.yml down -v
test-sdk: ## Run SDK integration tests (requires docker-test-services)
uv run python -m pytest tests/test_sdk/ -v
test-sdk-quick: ## Run SDK tests without LLM (models and connection only)
uv run python -m pytest tests/test_sdk/test_queryweaver.py::TestModels tests/test_sdk/test_queryweaver.py::TestQueryWeaverInit -v
test-all: test-unit test-sdk test-e2e ## Run all tests