[tools]
rust = "1.95"
uv = "latest"

[tasks."fixtures:sync"]
description = "Install Python deps for fixture generation (uv sync)"
dir = "{{config_root}}/fixtures"
run = "uv sync"

[tasks."fixtures:small"]
description = "Generate tracked small HDF5/NetCDF/Zarr fixtures (baseline, groups, cf)"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures small"

[tasks."fixtures:small-tet"]
description = "Regenerate tracked fixtures/small/tet/*.tet (verify/repair/query manual smoke)"
run = "cargo run --example gen_small_tet_fixtures"

[tasks."fixtures:large"]
description = "Generate gitignored large suite (~20 GiB total: h5 + nc + zarr)"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures large"

[tasks."fixtures:extra-large-h5"]
description = "Generate gitignored single 20 GiB HDF5 under fixtures/extra_large/h5/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures extra-large-h5"

[tasks."fixtures:extra-large-netcdf"]
description = "Generate gitignored single 20 GiB NetCDF under fixtures/extra_large/netcdf/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures extra-large-netcdf"

[tasks."fixtures:extra-large-zarr"]
description = "Generate gitignored single 20 GiB Zarr under fixtures/extra_large/zarr/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures extra-large-zarr"

[tasks."fixtures:large-h5"]
description = "Generate gitignored ~6.67 GiB HDF5 under fixtures/large/h5/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures large-h5"

[tasks."fixtures:large-netcdf"]
description = "Generate gitignored ~6.67 GiB NetCDF under fixtures/large/netcdf/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures large-netcdf"

[tasks."fixtures:large-zarr"]
description = "Generate gitignored ~6.67 GiB Zarr under fixtures/large/zarr/"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures large-zarr"

[tasks."fixtures:all"]
description = "Generate small and large suite fixtures"
depends = ["fixtures:sync"]
dir = "{{config_root}}/fixtures"
run = "uv run generate-fixtures all"

[tasks."fixtures:clean-all"]
description = "Remove all generated files under fixtures/"
confirm = "Delete all files in fixtures/?"
run = "rm -rf fixtures/large fixtures/extra_large fixtures/small"

[tasks."fixtures:clean-large"]
description = "Remove generated files under fixtures/large/"
confirm = "Delete all files in fixtures/large/?"
run = "rm -rf fixtures/large"

[tasks."fixtures:clean-extra-large"]
description = "Remove generated files under fixtures/extra_large/"
confirm = "Delete all files in fixtures/extra_large/?"
run = "rm -rf fixtures/extra_large"

[tasks."bench:auto"]
description = "Large/extra_large bench — .tet queries with execution.device auto (all formats)"
depends = ["fixtures:sync"]
run = "cargo build --release && uv run --directory fixtures bench-large --tet-device auto"

[tasks."bench:cpu"]
description = "Large/extra_large bench — .tet queries forced to CPU (all formats)"
depends = ["fixtures:sync"]
run = "cargo build --release && uv run --directory fixtures bench-large --tet-device cpu"

[tasks."bench:gpu"]
description = "Large/extra_large bench — .tet queries on CUDA device 0 (all formats; needs --features tetration-gpu)"
depends = ["fixtures:sync"]
run = "cargo build --release --features tetration-gpu && uv run --directory fixtures bench-large --tet-device cuda"

[tasks."bench:metal"]
description = "Large/extra_large bench — .tet queries on Metal (macOS; --features tetration-metal)"
depends = ["fixtures:sync"]
run = "cargo build --release --features tetration-metal && uv run --directory fixtures bench-large --tet-device metal"

[tasks.bench]
description = "Alias for bench:auto (device routing auto)"
depends = ["bench:auto"]

[tasks."bench:h5"]
description = "Benchmark large + extra_large HDF5 only (device auto; use bench:cpu / bench:gpu for other modes)"
depends = ["fixtures:sync"]
run = "cargo build --release && uv run --directory fixtures bench-large h5 --tet-device auto"

[tasks."bench:netcdf"]
description = "Benchmark large + extra_large NetCDF only (device auto)"
depends = ["fixtures:sync"]
run = "cargo build --release && uv run --directory fixtures bench-large netcdf --tet-device auto"

[tasks."bench:zarr"]
description = "Benchmark large + extra_large Zarr only (device auto)"
depends = ["fixtures:sync"]
run = "cargo build --release && uv run --directory fixtures bench-large zarr --tet-device auto"
