-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (36 loc) · 1.26 KB
/
Copy pathMakefile
File metadata and controls
49 lines (36 loc) · 1.26 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
.PHONY: install lint typecheck test format docker-up docker-ingest docker-eval ops-smoke platform-archive platform-submit-existing all
UV ?= uv
UV_DEV := $(UV) run --extra dev
COMPOSE ?= docker compose
EVAL_ARGS ?= python -m shafi.eval.harness --help
install:
$(UV) sync --extra dev
lint:
$(UV_DEV) ruff check src tests scripts
format:
$(UV_DEV) ruff format src tests scripts
$(UV_DEV) ruff check --fix src tests scripts
typecheck:
$(UV_DEV) pyright src/shafi tests/unit
test:
$(UV_DEV) pytest tests/unit -q
docker-up:
$(COMPOSE) up --build -d qdrant api
docker-ingest:
$(COMPOSE) --profile tools run --rm ingest
docker-eval:
$(COMPOSE) --profile tools run --rm eval $(EVAL_ARGS)
ops-smoke:
$(UV) run python scripts/container_contract_smoke.py
platform-archive:
$(COMPOSE) --profile tools run --rm eval python -m shafi.submission.platform --archive-only
platform-submit-existing:
@test -n "$(SUBMISSION_PATH)" || (echo "SUBMISSION_PATH is required"; exit 1)
@test -n "$(CODE_ARCHIVE_PATH)" || (echo "CODE_ARCHIVE_PATH is required"; exit 1)
$(COMPOSE) --profile tools run --rm eval \
python -m shafi.submission.platform \
--submit-existing \
--submission-path $(SUBMISSION_PATH) \
--code-archive-path $(CODE_ARCHIVE_PATH) \
--poll
all: lint typecheck test