.PHONY: install test lint format docs docs-serve build publish publish-test clean

install:
	uv sync --group dev

test:
	uv run pytest

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

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

docs:
	uv run --group docs sphinx-build -W -b html docs docs/_build/html

docs-serve: docs
	python -m http.server -d docs/_build/html 8000

clean:
	rm -rf dist/ docs/_build/

build: clean
	uv build

publish: build
	uv publish

publish-test: build
	uv publish --publish-url https://test.pypi.org/legacy/