Spun off from Codex review of #11.
src/framedex/index_videos.py imports the whole runtime stack (whisperx, requests) at module level and sys.exit(1)s on ImportError. CI only installs the dev + test groups (no whisperx/torch), so the entire module — not just one test — is uncoverable by CI. tests/test_index_videos.py currently uses pytest.importorskip("whisperx") to avoid breaking CI; the test runs locally but not in the gate.
Effect: a regression in any function inside index_videos.py (including the relative-path writer from #4 / #11) could land without CI catching it.
Options:
- Move
import whisperx / import requests to lazy imports inside the functions that use them; keep a friendly _assert_runtime() called from main() so the user-facing error message stays.
- Or extract the sidecar frontmatter assembly into a stdlib-only module (e.g.
framedex/sidecar.py) and have index_videos.write_sidecar delegate to it.
Either way the goal is: importing write_sidecar works without whisperx installed, so writer behavior can be regression-tested in CI.
No work scheduled yet — tracking only.
Spun off from Codex review of #11.
src/framedex/index_videos.pyimports the whole runtime stack (whisperx, requests) at module level andsys.exit(1)s on ImportError. CI only installs the dev + test groups (no whisperx/torch), so the entire module — not just one test — is uncoverable by CI.tests/test_index_videos.pycurrently usespytest.importorskip("whisperx")to avoid breaking CI; the test runs locally but not in the gate.Effect: a regression in any function inside
index_videos.py(including the relative-path writer from #4 / #11) could land without CI catching it.Options:
import whisperx/import requeststo lazy imports inside the functions that use them; keep a friendly_assert_runtime()called frommain()so the user-facing error message stays.framedex/sidecar.py) and haveindex_videos.write_sidecardelegate to it.Either way the goal is: importing
write_sidecarworks without whisperx installed, so writer behavior can be regression-tested in CI.No work scheduled yet — tracking only.