.PHONY: setup test lint type adr new coverage vulture fix radon treepeat ci arch docs domain

setup:
	uv venv
	uv sync --python .venv/bin/python

test:
	uv run pytest

lint:
	uv run ruff check .

vulture:
	uv run vulture --min-confidence 55 slarti

fix:
	uv run ruff check . --fix

type:
	uv run mypy

radon:
	uv run .github/scripts/check_radon.sh

treepeat:
	uv run treepeat detect . -i '**/node_modules/**,**/.venv/**,**/build/**'

ci: test lint type radon treepeat vulture

# The Python interfaces are a LinkML projection, not hand-written (see README).
domain:
	uv run gen-pydantic docs/slarti/linkml/slarti.yaml > slarti/domain.py

# slarti dogfoods itself (I13): the architecture document is generated by the tool.
arch:
	uv run slartiarch doctor
	uv run slartiarch check
	uv run slartiarch docs --check

docs:
	uv run slartiarch docs
