set default-list := true

[windows]
set shell := ["powershell.exe", "-NoLogo", "-Command"]

# Synchronize the locked Python development environment.
sync:
	uv sync --frozen --all-groups

# Verify that the Python lockfile is current.
lock:
	uv lock --check

# Build Python source and wheel distributions.
build:
	uv build

# Run the Python test suite.
test:
	uv run --no-sync pytest

# Run Ruff lint checks.
lint:
	uv run --no-sync ruff check

# Apply safe Ruff lint fixes.
lint-fix:
	uv run --no-sync ruff check --fix

# Check Python formatting with Ruff.
format:
	uv run --no-sync ruff format --check

# Apply Python formatting with Ruff.
format-fix:
	uv run --no-sync ruff format

# Run static type checking with ty.
typecheck:
	uv run --no-sync ty check

# Apply ty type-checking fixes.
typecheck-fix:
	uv run --no-sync ty check --fix

# Run all Python target quality checks.
verify: lint format typecheck test
