.DEFAULT_GOAL := all
.PHONY: install test lint format format-check typecheck audit clean all

install:
	uv sync --group dev

test:
	uv run pytest --cov=graphcrew --cov-report=term-missing --cov-fail-under=90

lint:
	uv run ruff check src/ tests/ examples/

format:
	uv run ruff format src/ tests/ examples/

format-check:
	uv run ruff format --check src/ tests/ examples/

typecheck:
	uv run mypy src/ tests/

audit:
	uv run pip-audit

clean:
	rm -rf dist/ build/ *.egg-info .mypy_cache .pytest_cache .ruff_cache .coverage htmlcov/ coverage.xml
	find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true

all: lint typecheck audit test
