# Sygaldry project recipes

# Default: list available recipes
default:
    @just --list

# Install the project in editable mode with dev dependencies
install:
    pixi install

# Run ruff linter
lint:
    pixi run -e dev ruff check sygaldry tests
    pixi run -e dev ruff format --check sygaldry tests

# Run ruff type checker (source only, not tests)
typecheck:
    pixi run -e dev ty check sygaldry

# Auto-fix lint issues and format code
fix:
    pixi run -e dev ruff check --fix sygaldry tests
    pixi run -e dev ruff format sygaldry tests

# Run tests with coverage
test *ARGS:
    pixi run -e dev pytest {{ARGS}}

# Run linting then tests
check: lint typecheck test

# Build the package
build:
    pixi run -e dev python -m build

# Build docs
docs:
    pixi run -e dev sphinx-build docs/source docs/_build

# Clean build artifacts
clean:
    rm -rf dist build *.egg-info coverage .coverage docs/_build

# Run tests in container via Bake (all Python versions)
bake:
    docker buildx bake

# Run tests in container for a single Python version (e.g., just bake-one py312)
bake-one target:
    docker buildx bake {{target}}
