.PHONY: lint test build publish publish-test clean release

lint:
	ruff check src/ tests/
	mypy src/

test:
	pytest tests/ -v --tb=short

build:
	rm -rf dist/
	python -m build

publish-test:
	twine upload --repository testpypi dist/*

publish:
	twine upload dist/*

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

release: lint test build publish
