.PHONY: help install lint format typecheck test check ci clean

help:
	@echo "Targets:"
	@echo "  install    uv sync (runtime + dev deps)"
	@echo "  lint       ruff check"
	@echo "  format     ruff format"
	@echo "  typecheck  mypy (strict)"
	@echo "  test       pytest with coverage"
	@echo "  check      lint + typecheck + test"
	@echo "  clean      remove caches and build artifacts"

install:
	uv sync

lint:
	uv run ruff check .

format:
	uv run ruff format .

typecheck:
	uv run mypy

test:
	uv run pytest

check: lint typecheck test

ci: check

clean:
	rm -rf .pytest_cache .mypy_cache .ruff_cache .hypothesis htmlcov \
	       .coverage coverage.xml dist build
	find . -type d -name __pycache__ -prune -exec rm -rf {} +
