# Pipeline Network Diagram Editor

UV ?= uv

.DEFAULT_GOAL := help

.PHONY: help sync run test lock clean

help: ## Show this help
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
		awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[36m%-12s\033[0m %s\n", $$1, $$2}'

sync: ## Create the venv and install dependencies
	$(UV) sync

run: ## Launch the editor
	$(UV) run pipeline-editor

test: ## Run the test suite headless
	QT_QPA_PLATFORM=offscreen $(UV) run pytest

lock: ## Update the lock file
	$(UV) lock

clean: ## Remove the venv, caches, and build artifacts
	rm -rf .venv build dist *.egg-info .pytest_cache .coverage htmlcov
	find . -type d -name __pycache__ -prune -exec rm -rf {} +
