.PHONY: help install lint format format-check clean

help:
	@echo "Python project commands:"
	@echo "  make install       - Set up virtual environment and install dependencies"
	@echo "  make lint          - Run Ruff linter"
	@echo "  make format        - Format code with Ruff"
	@echo "  make format-check  - Check formatting without modifying"
	@echo "  make clean         - Clean Python artifacts"

install:
	uv venv
	uv pip install -r requirements.txt

lint:
	uv run ruff check .

format:
	uv run ruff format .

format-check:
	uv run ruff format --check .

clean:
	rm -rf .venv
	rm -rf .ruff_cache
	find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete 2>/dev/null || true