Q130's closed-artifacts leg added "path": os.path.join(...) to verify.py's LEGS, so ast.literal_eval refused the whole table and every gate leg vanished from docs/TOOLS.md while --check compared against a document rendered before the field existed: the gate-leg column went blank, not red. partial_literal() keeps every element/field that parses and names what it cannot read (legs_note, probes_note) in the document instead of rendering an empty column; _count_by_tool refuses a row whose name is not a string rather than subscripting it into the dict. Selftest 20 -> 23 cells, pin moved with it, docs/TOOLS.md re-rendered (23 tools, 10 gate legs).
21 lines
743 B
Bash
Executable File
21 lines
743 B
Bash
Executable File
#!/bin/sh
|
|
# Q132 CHECK -- tool_map.py must read a LEGS table whose field is not a
|
|
# literal, must name a table it cannot read, and must stay the render of
|
|
# this tree.
|
|
#
|
|
# rc 0 = every leg as expected; 1 = a graded fault; 2 = could not grade.
|
|
# The work is done by wizard-work/volt/q132_verify.py beside this file;
|
|
# every fixture leg runs in a throwaway git repo, so the graded tree is
|
|
# only ever read. Run it from any checkout.
|
|
set -u
|
|
REPO="$(cd "$(dirname "$0")/../.." && pwd)" || exit 2
|
|
if ! cd "$REPO"; then
|
|
echo "q132: could not grade -- cannot cd to $REPO"
|
|
exit 2
|
|
fi
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
|
echo "q132: could not grade -- no python3 on PATH"
|
|
exit 2
|
|
fi
|
|
exec python3 wizard-work/volt/q132_verify.py
|