.DEFAULT_GOAL := help

.PHONY: help install format lint test test-deep build

help: ## Show this help
	@echo "Available commands:"
	@echo "  make install      Install deps into the venv (uv)"
	@echo "  make format       Auto-format the code (ruff --fix + black)"
	@echo "  make lint         Run code style + type checks (ruff, black, mypy)"
	@echo "  make test         Run fast (unit) tests with coverage"
	@echo "  make test-deep    Run deep (integration) tests over a real ASGI server"
	@echo "  make build        Build the sdist + wheel (uv build)"

install: ## Install deps into the venv (uv)
	uv sync --extra dev

format: ## Auto-format the code (ruff --fix + black)
	uv run ruff check --fix src tests examples
	uv run black src tests examples

lint: ## Run code style + type checks (ruff, black, mypy)
	uv run ruff check src tests examples
	uv run black --check src tests examples
	uv run mypy

test: ## Run fast (unit) tests with coverage
	uv run pytest -m "not deep" --cov=quart_httpauth --cov-report=term-missing --cov-report=xml

test-deep: ## Run deep (integration) tests over a real ASGI server
	uv run pytest -m deep

build: ## Build the sdist + wheel (uv build)
	uv build
