.PHONY: init install lint format typecheck check fix test release clean


init: precommit-install install

precommit-install:
	pre-commit install

install:
	uv sync --frozen --all-groups --link-mode=copy

lint:
	uv run ruff check .

format:
	uv run ruff format .

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

typecheck:
	uv run mypy .

test:
	uv run pytest

check: lint typecheck test format-check

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

build:
	uv build

release: clean check build

publish: release
	uv publish

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