-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
107 lines (81 loc) · 2.36 KB
/
Makefile
File metadata and controls
107 lines (81 loc) · 2.36 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
98
99
100
101
102
103
104
105
106
107
.PHONY: check-deps install dev dev-ui dev-backend run-dev build-ui run mock-llm clean lint format lint-frontend format-frontend format-all lint-all typecheck typecheck-frontend typecheck-all test test-integration test-e2e test-e2e-ui pre-merge setup
# check if required dependencies are installed
check-deps:
@echo "Checking dependencies..."
@command -v uv >/dev/null 2>&1 || { \
echo "❌ uv is not installed"; \
echo ""; \
echo "Please install uv:"; \
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"; \
echo ""; \
echo "Or visit: https://github.com/astral-sh/uv"; \
exit 1; \
}
@command -v yarn >/dev/null 2>&1 || { \
echo "❌ yarn is not installed"; \
echo ""; \
echo "Please install yarn:"; \
echo " npm install -g yarn"; \
echo ""; \
echo "Or visit: https://yarnpkg.com/getting-started/install"; \
exit 1; \
}
@echo "✅ All dependencies are installed"
install: check-deps
uv venv && uv sync
cd frontend && yarn install
dev: check-deps
uv venv && uv sync --group dev
cd frontend && yarn install
dev-ui:
cd frontend && yarn dev
dev-backend:
uv run uvicorn app:app --reload --host 0.0.0.0 --port 8000
run-dev:
@echo "Starting backend and frontend in development mode..."
@echo "Press Ctrl+C to stop both servers"
@trap 'kill 0' SIGINT; \
uv run uvicorn app:app --reload --host 0.0.0.0 --port 8000 & \
cd frontend && yarn dev & \
wait
build-ui:
cd frontend && yarn build
run: build-ui
uv run python app.py --host 0.0.0.0
mock-llm:
uv run python mock_llm.py
clean:
rm -rf __pycache__ */__pycache__ */*/__pycache__
rm -rf .mypy_cache .ruff_cache
rm -rf *.pyc */*.pyc */*/*.pyc
rm -rf data/*.db
rm -rf frontend/build frontend/node_modules
lint:
uv run ruff check .
format:
uv run ruff format .
lint-frontend:
cd frontend && yarn lint
format-frontend:
cd frontend && yarn format
format-all: format format-frontend
lint-all: lint lint-frontend
typecheck:
uv run mypy .
typecheck-frontend:
cd frontend && yarn type-check
typecheck-all: typecheck typecheck-frontend
test:
uv run pytest
test-integration:
uv run pytest -m integration -v
test-e2e:
./tests/e2e/run_all_tests.sh
test-e2e-ui:
./tests/e2e/run_all_tests.sh --ui
pre-merge: format-all lint-all typecheck-all test
@echo "✅ Pre-merge checks completed successfully. Ready to merge!"
setup:
cp .env.example .env
mkdir -p data
all: dev setup format lint typecheck