.PHONY: up down logs ps test test-unit test-integration migrate fmt lint typecheck demo clean eval-delta

up:
	docker compose --profile embeddings up -d
	@echo "Waiting for healthchecks..."
	@docker compose ps

down:
	docker compose --profile embeddings down

logs:
	docker compose logs -f

ps:
	docker compose ps

migrate:
	.venv/bin/python -m gnokee.storage.migrate

test: test-unit

test-unit:
	.venv/bin/pytest tests/unit -v

test-integration:
	.venv/bin/pytest tests/integration -v -m integration

fmt:
	.venv/bin/ruff format src tests

lint:
	.venv/bin/ruff check src tests

typecheck:
	.venv/bin/mypy --strict src/gnokee

demo:
	.venv/bin/python -m gnokee.demo

clean:
	docker compose --profile embeddings down -v

# v0.3 eval-delta regression gate.
# Contract + scope: docs/eval_delta_gate.md
# Today the runners do not yet accept --check-baseline; this stub wires
# the invocation skeleton. Flip the commented flags on once #16
# follow-up wires --check-baseline into each spike's run.py.
eval-delta:
	.venv/bin/python evals/spike_q1_graphiti/run.py        # --check-baseline
	.venv/bin/python evals/spike_q3_token_efficiency/run.py # --check-baseline
	.venv/bin/python evals/spike_q4_contradiction/run.py    # --check-baseline
	.venv/bin/python evals/spike_q7_lab_results/run.py      # --check-baseline
	.venv/bin/python evals/spike_q8_med_supersession/run.py # --check-baseline
