.PHONY: help design test serve

.DEFAULT_GOAL := help

REF ?=

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

design: ## Re-vendor whynot-design (optional: REF=v0.2.1 or commit SHA)
	./scripts/sync-whynot-design.sh $(REF)
	python3 -m pytest -q tests/test_ui_vendor.py

test: ## Run the full pytest suite
	python3 -m pytest -q

serve: ## Start the Economic Observatory UI on :8765
	python3 -m observatory.server