-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (70 loc) · 1.91 KB
/
Makefile
File metadata and controls
91 lines (70 loc) · 1.91 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
PYTHON ?= python
PIP ?= pip
.PHONY: install
install:
$(PIP) install -r requirements.txt
.PHONY: all-data
all-data: sim-prod extract-schema synth gen-queries augment ground-truth gen-nl
.PHONY: sim-prod
sim-prod:
$(PYTHON) scripts/01_simulate_prod_db.py
.PHONY: extract-schema
extract-schema:
$(PYTHON) scripts/02_extract_schema.py
.PHONY: synth
synth:
$(PYTHON) scripts/03_generate_synthetic_data.py
.PHONY: gen-queries
gen-queries:
$(PYTHON) scripts/04_generate_queries.py
.PHONY: augment
augment:
$(PYTHON) scripts/05_augment_sandbox.py
.PHONY: ground-truth
ground-truth:
$(PYTHON) scripts/06_ground_truth.py
.PHONY: gen-nl
gen-nl:
$(PYTHON) scripts/07_generate_nl_questions.py
.PHONY: test
test:
pytest -q
# ============================================================
# Verification targets - validate synthetic data pipeline
# ============================================================
.PHONY: verify
verify: verify-db verify-queries verify-gt verify-dataset verify-nl-sql
@echo "✅ All verifications complete!"
.PHONY: verify-db
verify-db:
$(PYTHON) scripts/verify_database.py
.PHONY: verify-queries
verify-queries:
$(PYTHON) scripts/verify_queries.py
.PHONY: verify-gt
verify-gt:
$(PYTHON) scripts/verify_ground_truth.py
.PHONY: verify-dataset
verify-dataset:
$(PYTHON) scripts/verify_dataset.py
.PHONY: verify-nl-sql
verify-nl-sql:
$(PYTHON) scripts/verify_nl_sql_match.py
.PHONY: verify-all
verify-all:
$(PYTHON) scripts/verify_all.py
# ============================================================
# Docker targets
# ============================================================
.PHONY: mcp-build
mcp-build:
docker build -t text-to-sql-mcp:latest .
.PHONY: mcp-deploy
# Usage: make mcp-deploy PROJECT_ID=your-id REGION=us-central1
mcp-deploy:
gcloud run deploy mcp-sql-rft-server \
--source mcp_server \
--project $(PROJECT_ID) \
--region $(REGION) \
--allow-unauthenticated \
--port 8080