build:
    uv build

publish:
    uv publish

# --all-extras, as CI does: without nautilus the execution tests fail to import.
# Extra arguments go to pytest, e.g. `just test tests/test_emitter.py -k sell`.
test *args:
    uv run --all-extras pytest {{args}}

# Rewrites files in place. `ruff format --check .` is what CI and the
# pre-commit hook enforce.
format:
    uv run ruff format .

# Points git at the tracked hooks in ../.githooks. Once per clone; it is a
# local git setting, so it covers every worktree of that clone.
hooks:
    git config core.hooksPath .githooks

# What CI runs, minus the coverage reports.
check:
    uv run --all-extras ruff check .
    uv run --all-extras ruff format --check .
    uv run --all-extras mypy
    uv run --all-extras pytest
