.PHONY: install-dev fmt lint typecheck test build check-dist publish-testpypi publish-pypi clean

install-dev:
	uv sync --extra dev

fmt:
	uv run ruff format src tests

lint:
	uv run ruff check src tests README.md

typecheck:
	uv run mypy src

test:
	uv run pytest

build:
	uv build

check-dist:
	uv run twine check dist/*

publish-testpypi:
	uv publish --publish-url https://test.pypi.org/legacy/ --check-url https://test.pypi.org/simple/

publish-pypi:
	uv publish

clean:
	rm -rf .mypy_cache .pytest_cache .ruff_cache build dist src/*.egg-info
