# Try the CLI without installing: `just run find 'muon calibration'`
run *args:
    uv run warpdrive {{ args }}

test:
    uv run pytest

# Lint, format-check and type-check — a green `just check` is the bar.
check:
    uv run ruff check .
    uv run ruff format --check .
    uv run mypy
    @just check-rules

# The three adopted Power of Ten rules ruff cannot express — no recursion and
# no computed attribute names (1), bounded `while` loops (2), and a 60-line
# advisory on function length (4). The other three adopted rules (5, 6, 7) are
# ruff rules and run above. See docs/power-of-ten.md.
check-rules:
    PYTHONPATH=. uv run python scripts/check_power_of_ten.py

# Apply every fix ruff can make on its own, then format.
fix:
    uv run ruff check . --fix
    uv run ruff format .
