From 37cc00fa21047aea3f4adecf96926dcce9bccb5a Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 29 Aug 2026 08:44:02 +0200 Subject: [PATCH] Say which jupyter problem it is, and regenerate the status table `_works jupyter || _blocked "needs jupyter"` collapsed two different problems into one message. "needs jupyter" and "jupyter is on PATH but does not run" send you to different fixes -- install it, versus work out why the shim's interpreter is gone -- and a status table is only worth keeping if it says which. `_require_working` checks presence and then execution, and reports them separately. The wording is now what DOCS-runnability.md already said for twm_4 and PBAD, except the probe produces it rather than someone having typed it. Regenerating the table changed those two rows and nothing else, which is the useful part: the run guard, the two new .venv directories under PSD and ERSMS-project, and the tex entry-point change left all 44 courses' status exactly as it was. One thing worth knowing for the next regeneration: the answer depends on PATH. jupyter lives in ~/.local/bin, so a shell without it reports "needs jupyter" and one with it reports the dead shim. Regenerate from a login shell. Co-Authored-By: Claude Opus 5 --- DOCS-runnability.md | 4 ++-- gates/runnability-local.tsv | 4 ++-- scripts/course_lib.sh | 9 +++++++++ scripts/course_probe.sh | 2 +- scripts/course_run.sh | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) 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.