default: qa

qa: check test

check: lint format-check dprint-check ty check-skills

check-skills:
    uv run nonslop check

lint:
    uv run ruff check

format-check:
    uv run ruff format --check

dprint-check:
    dprint check

fix:
    uv run ruff check --fix --unsafe-fixes
    uv run ruff format

dprint-fix:
    dprint fmt

ty:
    uv run ty check

test:
    uv run pytest -n auto

build: clean
    uv build

publish: build
    uvx uv-publish

clean:
    rm -rf dist/*.whl dist/*.tar.gz
    find . -type d -name "__pycache__" -exec rm -rf {} + || true
    find . -type d -name ".pytest_cache" -exec rm -rf {} + || true
    find . -type d -name ".ruff_cache" -exec rm -rf {} + || true
    find . -type d -name "*.egg-info" -exec rm -rf {} + || true
    find . -type d -name ".ty" -exec rm -rf {} + || true
    find . -type f -name "*.pyc" -delete || true
