.PHONY: help install dev format lint test build clean publish

help:
	@echo "Available commands:"
	@echo "  make install  - Install the package and dependencies"
	@echo "  make dev      - Install the package in editable mode with dev dependencies"
	@echo "  make format   - Format code using black and isort (if installed)"
	@echo "  make lint     - Run linters (flake8, mypy, etc. if installed)"
	@echo "  make test     - Run tests using pytest"
	@echo "  make build    - Build source and wheel packages"
	@echo "  make clean    - Remove build artifacts and cache directories"
	@echo "  make publish  - Publish the package to PyPI"

install:
	uv pip install .

dev:
	uv pip install -e ".[dev]" pytest

test:
	pytest tests/ -v

build: clean
	uv build

clean:
	rm -rf dist/
	rm -rf build/
	rm -rf *.egg-info/
	rm -rf .pytest_cache/
	find . -type d -name "__pycache__" -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete

publish: build
	uv publish
