.PHONY: test tests integration_test integration_tests lint format help

.DEFAULT_GOAL := help

TEST_FILE ?= tests/unit_tests/

test tests: ## Run unit tests (no network)
	uv run --group test pytest -vv --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests: ## Run tests against real PandaStack (needs PANDASTACK_API_KEY)
	uv run --group test pytest -vv --timeout 300 tests/integration_tests/

lint: ## Check formatting and lint rules
	uv run --group test ruff format --check .
	uv run --group test ruff check .

format: ## Format and auto-fix
	uv run --group test ruff format .
	uv run --group test ruff check --fix .

help: ## Show this help
	@grep -E '^[a-zA-Z_ ]+:.*## ' $(MAKEFILE_LIST) | sed 's/:.*## /\t/'
