mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-27 07:00:47 +01:00
Catalogs list each kind's versions with notes, cost and benchmark numbers: hands/models.json (Latest = v13b-p1, stock) and gaze/tracker/models.json (classic, SteamVR, eyes-v0 as Testing). Installs read their branch's catalog from GitHub, so a new version reaches them with a push; offline, the copy in the install is used. models/catalog.py (+ ft-models CLI) validates catalogs strictly, downloads versions from the kind's fixed Hugging Face repo pinned to a commit, and keeps only files matching their sha256. HANDS_MODEL and EYES_MODEL pick latest (follows new versions), a version by name, or a builtin. ft-hands and ft-eyes read them at start; Input Settings restarts hand tracking and ft-gazed restarts ft-eyes when the setting changes. The services fetch what the setting needs at start (HANDS_MODELS_UPDATE / EYES_MODELS_UPDATE = 0 turn that off). Input Settings: "Hand model" on the Hands page, "Eye tracker" on the Gaze page (replaces the Own/SteamVR switch), tagged Recommended / Testing / Older / Built in, with a benchmark table against the model in use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
3.9 KiB
Makefile
80 lines
3.9 KiB
Makefile
# just — the runner for the actions that happen inside the image.
|
|
# The CI smoke job runs these with: docker run ... IMAGE just test
|
|
# Host-side image management (build, shell, update) lives in ./ft; these
|
|
# recipes only ever run where the toolchain and the venv are: in the image.
|
|
|
|
# default: list the recipes
|
|
default:
|
|
@just --list
|
|
|
|
# everything, strict (the recipes are the source of truth)
|
|
test: test-python test-c test-bash
|
|
|
|
# the Python suites as a strict gate: every failure fails the run. The image's
|
|
# python3 has to import the dnf Qt stack and the locked packages together;
|
|
# without that check the Qt tests would only skip. session/test is not here:
|
|
# test_accessibility.py needs the host's AT-SPI and PyGObject, test_notifyfwd.py
|
|
# the host's dbus-daemon and PyGObject.
|
|
test-python:
|
|
#!/usr/bin/env bash
|
|
set -uo pipefail
|
|
python3 -c 'import PySide6, numpy, cv2, sherpa_onnx' || { echo "python3 can't import PySide6, numpy, cv2, and sherpa_onnx"; exit 1; }
|
|
status=0
|
|
for t in models/test/*.py input/test/*.py hands/tests/test_*.py hands/rec/tests/*.py recorder/tests/*.py gaze/test/*.py gaze/rec/tests/*.py pack/test/*.py voice/test/*.py spotwatch/test/*.py; do
|
|
[ -f "$t" ] || continue
|
|
if python3 "$t" >/dev/null; then echo "$t: ok"; else echo "$t: FAILED"; status=1; fi
|
|
done
|
|
pytest -q session/tests || status=1
|
|
exit $status
|
|
|
|
# the C/C++ unit tests that need no model runtime: header-only logic with
|
|
# made-up events (pointer/tests: the helper's hand interaction logic). sides_test.cpp is NOT here: it pulls in ncnn (hands'
|
|
# heavy build) and stays with `make check` in the hands build
|
|
# (hands/Makefile).
|
|
test-c:
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
mkdir -p build/tests
|
|
gcc -std=c11 -Wall -Wextra -Werror -I. screens/tests/controller-click-test.c \
|
|
-lm -o build/tests/controller-click-test
|
|
build/tests/controller-click-test && echo "screens/tests/controller-click-test.c: ok"
|
|
gcc -std=c11 -Wall -Wextra -Werror screens/tests/relay-buttons-test.c \
|
|
-o build/tests/relay-buttons-test
|
|
build/tests/relay-buttons-test && echo "screens/tests/relay-buttons-test.c: ok"
|
|
g++ -std=c++17 -O2 -Wall -Wextra -Wno-unused-parameter -Werror screens/tests/handinput_test.cpp \
|
|
screens/handcut.cpp screens/handinput.cpp screens/palmmenu.cpp screens/grabthat.cpp screens/steampanels.cpp -o build/tests/handinput-test
|
|
build/tests/handinput-test && echo "screens/tests/handinput_test.cpp: ok"
|
|
g++ -std=c++17 -O2 -Wall -Wextra -Wno-unused-parameter -Werror screens/tests/handview_test.cpp \
|
|
screens/handmesh.cpp screens/handskin.cpp screens/handrobot.cpp screens/handcut.cpp -o build/tests/handview-test
|
|
build/tests/handview-test >/dev/null && echo "screens/tests/handview_test.cpp: ok"
|
|
python3 -I screens/tools/hand-asset.py --check
|
|
for t in pointer/tests/*-test.cpp; do
|
|
n=$(basename "$t" .cpp)
|
|
g++ -std=c++17 -Wall -Wextra -Werror -I. "$t" -o "build/tests/$n"
|
|
"build/tests/$n" >/dev/null && echo "$t: ok"
|
|
done
|
|
|
|
# shell scripts: syntax-gate everything that ships. No git: the image has
|
|
# none, and a mounted checkout can trip "dubious ownership" — find lists
|
|
# what the repo actually ships. The count guard makes a silently short
|
|
# list fail the gate instead of passing it.
|
|
test-bash:
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
mapfile -t scripts < <(find . -name '*.sh' -type f \
|
|
-not -path './.git/*' -not -path '*/build/*' | sort)
|
|
[ "${#scripts[@]}" -ge 20 ] || { echo "only ${#scripts[@]} scripts found — the list is broken"; exit 1; }
|
|
status=0
|
|
for f in "${scripts[@]}" ft; do
|
|
bash -n "$f" && echo "bash -n $f: ok" || status=1
|
|
done
|
|
exit $status
|
|
|
|
# lint the Python side (ruff from the locked dev group). Report only for now:
|
|
# the codebase has pre-existing findings; making it a gate is its own cleanup.
|
|
lint:
|
|
-ruff check .
|
|
|
|
# the whole gate: lint, then tests
|
|
check: lint test
|