diff --git a/DOCS-runnability.md b/DOCS-runnability.md index 8daa0d51..953a1ed1 100644 --- a/DOCS-runnability.md +++ b/DOCS-runnability.md @@ -47,12 +47,12 @@ run cannot clobber the local column. | `Programming/E-PSYOPS` | runnable | - | opens in the Unity editor | | `Programming/ERSMS-project` | runnable | - | docker compose up | | `Programming/NLP` | runnable | - | python3 the entry script | -| `Programming/PBAD` | blocked | - | jupyter is on PATH but broken (bad interpreter) | +| `Programming/PBAD` | blocked | - | jupyter is on PATH but does not run (dead shim) | | `Programming/PORR` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/PORR/code/main.py | | `Programming/PSD` | runnable | - | starts the Kafka/Flink stack (installs packages with sudo) | | `Programming/psd_project` | runnable | - | mvn package | | `Programming/TRAK` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/TRAK/main.py | -| `Programming/twm_4` | blocked | - | jupyter is on PATH but broken (bad interpreter) | +| `Programming/twm_4` | blocked | - | jupyter is on PATH but does not run (dead shim) | | `Programming/USD` | no-code | - | README describes a MetaDrive RL assignment; no implementation was submitted | | `Programming/WDWR` | runnable | - | python3 the entry script | | `Programming/ZPOB` | runnable | - | builds the report with latexmk | diff --git a/gates/runnability-local.tsv b/gates/runnability-local.tsv index ffec41ae..ac5b9be1 100644 --- a/gates/runnability-local.tsv +++ b/gates/runnability-local.tsv @@ -33,12 +33,12 @@ Programming/EPFU runnable make Programming/E-PSYOPS runnable opens in the Unity editor Programming/ERSMS-project runnable docker compose up Programming/NLP runnable python3 the entry script -Programming/PBAD blocked jupyter is on PATH but broken (bad interpreter) +Programming/PBAD blocked jupyter is on PATH but does not run (dead shim) Programming/PORR runnable python3 /home/kuhy/WUT_Computer_Science/Programming/PORR/code/main.py Programming/PSD runnable starts the Kafka/Flink stack (installs packages with sudo) Programming/psd_project runnable mvn package Programming/TRAK runnable python3 /home/kuhy/WUT_Computer_Science/Programming/TRAK/main.py -Programming/twm_4 blocked jupyter is on PATH but broken (bad interpreter) +Programming/twm_4 blocked jupyter is on PATH but does not run (dead shim) Programming/USD no-code README describes a MetaDrive RL assignment; no implementation was submitted Programming/WDWR runnable python3 the entry script Programming/ZPOB runnable builds the report with latexmk diff --git a/scripts/course_lib.sh b/scripts/course_lib.sh index 955dc65c..c995c433 100644 --- a/scripts/course_lib.sh +++ b/scripts/course_lib.sh @@ -39,6 +39,15 @@ _have() { command -v "$1" > /dev/null 2>&1; } # _works only for tools that answer --version; _have is right for the rest. _works() { _have "$1" && timeout 5 "$1" --version > /dev/null 2>&1; } +# Blocked-with-a-reason for a tool that has to actually run. "needs jupyter" +# and "jupyter is on PATH but does not run" send you to different fixes, and +# the status table is only worth keeping if it says which. +_require_working() { + local tool="$1" + _have "$tool" || _blocked "needs $tool" + _works "$tool" || _blocked "$tool is on PATH but does not run (dead shim)" +} + # Report "blocked" with the reason, which is the whole point of the status # table: "needs X" is useful, "failed" is not. _blocked() { diff --git a/scripts/course_probe.sh b/scripts/course_probe.sh index 5dc43347..9e045cf9 100644 --- a/scripts/course_probe.sh +++ b/scripts/course_probe.sh @@ -52,7 +52,7 @@ _probe() { _runnable "compiles each standalone .cpp" ;; notebook) - _works jupyter || _blocked "needs jupyter" + _require_working jupyter # Being on PATH is not the same as working: this machine has a # jupyter shim whose pipx venv interpreter is gone, so it fails # with "bad interpreter". Probe by actually invoking it. diff --git a/scripts/course_run.sh b/scripts/course_run.sh index 4e135f00..0c5042fc 100644 --- a/scripts/course_run.sh +++ b/scripts/course_run.sh @@ -181,7 +181,7 @@ _run() { printf 'binaries in %s/build\n' "$COURSE_ROOT" ;; notebook) - _works jupyter || _blocked "needs jupyter" + _require_working jupyter # NOT --inplace: all four notebooks in this repo are tracked WITH # their outputs, so executing in place rewrites a deliverable. # --output-dir sends the executed copy to a temp dir instead.