From d6cf41f66500d4afc157b4f43de0f0d5bfa01443 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Fri, 10 Apr 2026 17:30:11 +0200 Subject: [PATCH] Add shorthand to run input generators. --- justfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/justfile b/justfile index 243fa19..85f4744 100644 --- a/justfile +++ b/justfile @@ -1,2 +1,12 @@ prettify: nix shell nixpkgs#clang-tools -c clang-format -i src/**.cpp src/**.hpp + +# Run a Sage script in a Docker container. +# Output is written relative to the script's directory. +# Example: just sage-run blend/generate_inputs_for_poq.py 1 10 5 0 +# -> blend/input.json +sage-run script +args='': + docker run --rm \ + -v "{{justfile_directory()}}:/work" \ + -w "/work/$(dirname '{{script}}')" \ + sagemath/sagemath sage "$(basename '{{script}}')" {{args}}