.PHONY: clean build publish publish-test version-patch version-minor version-major

# Clean build artifacts
clean:
	rm -rf dist/ build/ src/*.egg-info *.egg-info

# Build the package
build: clean
	python -m build

# Publish to PyPI
publish: build
	python -m twine upload dist/*

# Publish to TestPyPI (for testing)
publish-test: build
	python -m twine upload --repository testpypi dist/*

# Development setup
dev:
	pip install -e ".[dev]"

# Run tests
test:
	pytest

# Lint code
lint:
	ruff check .
	black --check .

# Format code
format:
	ruff check --fix .
	black .

# Type check
typecheck:
	mypy src/

# Help
help:
	@echo "Available commands:"
	@echo "  make clean        - Remove build artifacts"
	@echo "  make build        - Build the package"
	@echo "  make publish      - Publish to PyPI"
	@echo "  make publish-test - Publish to TestPyPI"
	@echo "  make dev          - Install in development mode"
	@echo "  make test         - Run tests"
	@echo "  make lint         - Check code style"
	@echo "  make format       - Format code"
	@echo "  make typecheck    - Run type checker"
