fix: use ffprobe_path() instead of hardcoded /usr/bin/ffprobe in test_video.py - #119
Conversation
…_video.py Fixes Hebbian-Robotics#115 Replaced the manual ffprobe resolution logic in _ffprobe_video_stream_fields() with a single call to ffprobe_path(), following the pattern from PR Hebbian-Robotics#110. - Added ffprobe_path to imports from hflow.ffmpeg - Removed hardcoded /usr/bin/ffprobe fallback - All 9 tests in test_video.py pass
|
👋 Hi @kragent66-glitch — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
kstonekuan
left a comment
There was a problem hiding this comment.
Welcome, and LGTM. Merging.
Exactly the fix the issue asked for, and you kept the ffmpeg_path import because line 33 still uses it, which is the easy thing to get wrong when swapping a resolver. The definition-of-done grep comes back empty, so no hardcoded binary path is left in tests/.
Validated against main (2f99071): ruff check, ruff format --check, ty check all clean, 645 passed and 3 skipped.
One correction worth having for next time: the pyarrow errors you saw are not pre-existing, they are a missing extra. uv sync --locked --all-extras installs it and ty check then passes clean. Worth re-syncing with that flag before deciding a failure is upstream, since it also makes pytest collect the arrow tests you were otherwise skipping.
Also: we cap non-collaborators at one open pull request at a time, so a bot will auto-close a second one with a note rather than losing it.
Fixes #115
Problem
tests/test_video.py reimplements ffprobe resolution with a hardcoded Linux path (/usr/bin/ffprobe) as fallback, missing the HFLOW_FFPROBE override and proper error handling from ffprobe_path().
Solution
Replaced the manual resolution logic in _ffprobe_video_stream_fields() with a single call to ffprobe_path(), following the pattern established in PR #110.
Changes
Verification