Skip to content

fix: use ffprobe_path() instead of hardcoded /usr/bin/ffprobe in test_video.py - #119

Merged
kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
kragent66-glitch:fix/use-ffprobe-path-in-test-video
Aug 23, 2026
Merged

fix: use ffprobe_path() instead of hardcoded /usr/bin/ffprobe in test_video.py#119
kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
kragent66-glitch:fix/use-ffprobe-path-in-test-video

Conversation

@kragent66-glitch

Copy link
Copy Markdown
Contributor

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

  • Added ffprobe_path to imports from hflow.ffmpeg
  • Replaced 3 lines of manual resolution with ffprobe_path()

Verification

  • All 9 tests in tests/test_video.py pass
  • No hardcoded binary paths remain in tests
  • Quality checks pass (ruff check, ruff format)
  • Note: ty check has pre-existing errors about missing pyarrow module unrelated to this change

…_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
@github-actions

Copy link
Copy Markdown

👋 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 kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kstonekuan
kstonekuan merged commit 33cca6d into Hebbian-Robotics:main Aug 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: test_video.py falls back to a hardcoded /usr/bin/ffprobe instead of calling ffprobe_path()

2 participants