.PHONY: setup test test-render test-all lint format docs docs-build build clean

setup:
	pip install -e ".[dev]"
	pre-commit install

# Fast, deterministic suite (what CI gates on). Render/graphical tests skip.
test:
	pytest tests --cov=easymanim --cov-report=xml --cov-report=term

# Real-render tests (need a LaTeX toolchain + exact fonts).
test-render:
	EASYMANIM_RENDER_TESTS=1 pytest tests/test_video tests/test_graphical

test-all: test test-render

lint:
	ruff check src tests examples
	mypy src

format:
	ruff format .

docs:
	mkdocs serve

docs-build:
	mkdocs build --strict

build:
	python -m build
	python -m twine check dist/*

clean:
	rm -rf .pytest_cache .ruff_cache .mypy_cache .coverage coverage.xml site
	find . -type d -name "__pycache__" -exec rm -rf {} +
	rm -rf dist build *.egg-info
