-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (53 loc) · 1.86 KB
/
Copy pathMakefile
File metadata and controls
76 lines (53 loc) · 1.86 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
.PHONY: dev down install lint typecheck test fmt check ingest ingest-gold search ask resume show bench bench-slice ingest-fulltext reembed ui ui-install ui-dev ui-check
ask:
uv run python -m agent.cli ask --question "$(Q)" $(if $(PAUSE),--pause-before $(PAUSE))
resume:
uv run python -m agent.cli resume --run-id "$(RUN)"
show:
uv run python -m agent.cli show --run-id "$(RUN)"
N ?= 20
MODE ?=
ingest-gold:
uv run python -m retrieval.cli ingest-gold
ingest:
uv run python -m retrieval.cli ingest --query "$(Q)" --n $(N)
# Dry run by default: fetches and extracts but never embeds, so chunk counts can be
# checked before spending the metered call budget. RUN=1 does the real thing.
ingest-fulltext:
uv run python -m retrieval.cli ingest-fulltext $(if $(RUN),,--dry-run) $(if $(LIMIT),--limit $(LIMIT))
# Re-embed every stored chunk with the active embedding backend (provider migrations).
# Dry run by default; RUN=1 does the real thing.
reembed:
uv run python -m retrieval.cli reembed $(if $(RUN),,--dry-run)
search:
uv run python -m retrieval.cli search --query "$(Q)" $(if $(MODE),--mode $(MODE))
bench:
uv run python -m bench.harness $(if $(LABEL),--label $(LABEL)) $(if $(LIMIT),--limit $(LIMIT)) $(if $(ONLY),--only $(ONLY))
bench-slice:
uv run python -m bench.harness --slice --label slice
install:
uv sync
dev: install
docker compose up -d --wait
uv run uvicorn app.main:app --reload --port 8000
down:
docker compose down
lint:
uv run ruff check .
uv run ruff format --check .
fmt:
uv run ruff format .
uv run ruff check --fix .
typecheck:
uv run mypy
test:
uv run pytest -q
check: lint typecheck test
ui-install:
cd ui && npm install
ui: ## build the UI into ui/dist, which the API serves
cd ui && npm run build
ui-dev: ## Vite dev server on :5173, proxying the API on :8000
cd ui && npm run dev
ui-check:
cd ui && npm run typecheck