set shell := ["bash", "-uc"]

default:
    just --list

# Install/sync dev dependencies
sync:
    uv sync --group dev

# Lint (matches CI)
lint:
    uv run ruff check

# Format check (matches CI)
format-check:
    uv run ruff format --check

# Auto-fix lint issues and format
fix:
    uv run ruff check --fix
    uv run ruff format

# Run the tests. Extra args are passed through, e.g. `just test -k tolerance`
test *args:
    uv run python -m pytest -q {{args}}

# Everything CI runs
ci: sync lint format-check test

# The 10 M row demo files, in demo/
demo rows="10000000":
    uv run python tools/make_demo_data.py {{rows}} demo

# Time the demo diff
bench: demo
    uv run ddiff demo/old.parquet demo/new.parquet --summary || true

# README screenshots (needs Chrome)
shots: demo
    uv run python tools/screenshots.py demo assets

# Small example file pairs, each showing a feature (see examples/README.md)
examples:
    uv run python tools/make_examples.py examples
