Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Local checks

Run from the root of the Bobine repository. Every command below runs before a commit that touches its part.

PYTHONPATH=backend backend/.venv/bin/python -m pytest backend/tests/
backend/.venv/bin/ruff check .
cd frontend && npm test && npx tsc --noEmit && npm run lint
cd frontend && npm run build
cd android && ./gradlew testMobileDebugUnitTest assembleRelease
cd media && cargo clippy --locked --all-targets -- -D warnings
cd media && cargo test --locked
python3 -m unittest discover -s scripts/ci -p 'test_*.py'

The same two cargo commands run in devices/ and projector/. The last line runs when a workflow or a file under scripts/ changes. A change to the frontend or the media path also runs the Firefox smoke tests, scripts/browser-bench/e2e_firefox.py –resume, against an isolated backend.

Isolated backend

Never stop a Bobine that serves a room or a desk. Tests run on a free port with their own data:

backend/.venv/bin/python scripts/browser-bench/run_test_backend.py 8078

It sets BOBINE_USE_XDG=1, its own XDG_DATA_HOME and BOBINE_MDNS=0, and serves frontend/out. A benchmark that changes an output’s mode sets it back afterwards. Stop the server by the PID that ss -ltnp shows for its port, never by a broad pkill.

Pitfalls

Guards that read git ls-files still see a deleted file until it is staged: git add -A before the suite. A route or command change regenerates the reference with scripts/generators/export_reference.py, then the copy in BobineWeb under src/content/reference/. A moved Next.js page needs npm run build before tsc, for the .next types. The repository path may contain a space: quote every path in scripts.