.PHONY: test lint format check
UV_CACHE_DIR ?= .uv-cache

test:
	UV_CACHE_DIR=$(UV_CACHE_DIR) uv run pytest tests/ -v --tb=short -m "not kind"

lint:
	UV_CACHE_DIR=$(UV_CACHE_DIR) uv run ruff check src/ tests/
	UV_CACHE_DIR=$(UV_CACHE_DIR) uv run ruff format --check src/ tests/
	UV_CACHE_DIR=$(UV_CACHE_DIR) uv run mypy src/

format:
	UV_CACHE_DIR=$(UV_CACHE_DIR) uv run ruff format src/ tests/

render-demos:
	find demos -type f -name '*.tape' -exec sh -c 'printf "\n==> %s\n" "$$1"; vhs -q "$$1"' sh {} \;

check: lint test
