Skip to content

Standardize workspace on headless OpenCV#383

Open
Arison591 wants to merge 1 commit into
NVIDIA:mainfrom
Arison591:agent/standardize-opencv-headless
Open

Standardize workspace on headless OpenCV#383
Arison591 wants to merge 1 commit into
NVIDIA:mainfrom
Arison591:agent/standardize-opencv-headless

Conversation

@Arison591

Copy link
Copy Markdown

Summary

  • remove FlashVSR's unused direct dependency on the GUI-enabled opencv-python distribution
  • switch ludus-renderer's development extra to opencv-python-headless
  • regenerate both the workspace and standalone ludus-renderer lockfiles
  • add a CPU dependency-policy test that prevents workspace packages from reintroducing conflicting OpenCV distributions

Why

The opencv-python and opencv-python-headless distributions install the same cv2 namespace and should not coexist in one environment. FlashDreams already standardizes on the headless distribution for server and CI use, but FlashVSR and ludus-renderer's development extra could still bring the GUI distribution into the shared workspace.

FlashVSR does not import cv2 directly, so its extra direct dependency is unnecessary. The renderer's development dependency still provides the same Python API through the headless build.

This does not add a new third-party component: opencv-python-headless is already used throughout the workspace and recorded in THIRD-PARTY-NOTICES.

Validation

  • PYTHONPATH=flashdreams python -m pytest tests/test_dependency_policy.py -m ci_cpu -q — 1 passed
  • uv lock --check — passed
  • uv lock --check --project integrations/omnidreams/ludus-renderer — passed
  • ruff check tests/test_dependency_policy.py — passed
  • ruff format --check tests/test_dependency_policy.py — passed
  • uvx ty check tests/test_dependency_policy.py — passed
  • uvx --from reuse reuse lint — REUSE 3.3 compliant, 508/508 files covered

GPU inference was not run because this change only affects dependency metadata and its CPU policy test.

The commit is signed off under the Developer Certificate of Origin.

Signed-off-by: Haoran Qian <haoran@hust.edu.cn>
@copy-pr-bot

copy-pr-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@gtong-nv

Copy link
Copy Markdown
Collaborator

Hi @Arison591, thanks for the PR. Can you mark it "Ready for review" so that we can land it?
This PR should fix #363

@Arison591
Arison591 marked this pull request as ready for review July 20, 2026 23:19
@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the unused opencv-python (GUI) distribution from FlashVSR, switches ludus-renderer's dev extra to opencv-python-headless, regenerates both lockfiles, and adds a pytest policy test that prevents any workspace member from reintroducing conflicting OpenCV distributions.

  • The workspace lockfile cleanly drops the opencv-python 4.13.0.92 entry while retaining the already-present opencv-python-headless 4.13.0.92 wheel; all workspace-level marker refinements in the lockfile are mechanical uv re-lock output.
  • The standalone ludus-renderer lockfile was regenerated and resolved opencv-python-headless to 5.0.0.93 — a major version bump over the previously locked 4.13.0.92 opencv-python — which was not validated by running the dev test suite against the standalone lock.
  • The new policy test is well-structured: it reads pyproject.toml files directly from disk (bypassing the lockfile), normalises package names per PEP 503, and covers project.dependencies, optional-dependencies, dependency-groups, and build-system.requires; tomli is correctly declared in the workspace test dependency group.

Confidence Score: 4/5

Safe to merge for workspace users; the standalone ludus-renderer lockfile carries an unverified OpenCV major version bump worth a quick sanity-run before tagging a release.

All workspace-level changes are clean metadata removals backed by a well-designed policy test. The one gap is that the standalone lockfile resolves to opencv-python-headless 5.0.0.93 — a major version jump — and the ludus-renderer dev test suite was not run against it.

integrations/omnidreams/ludus-renderer/uv.lock — the standalone lock resolves opencv-python-headless to 5.0.0.93; worth running the ludus-renderer dev pytest suite against it before merging if those tests touch cv2.

Important Files Changed

Filename Overview
tests/test_dependency_policy.py New CI policy test that enforces headless-only OpenCV across all workspace members by scanning pyproject.toml files; logic is correct, tomli dependency is declared in the test group.
integrations/flashvsr/pyproject.toml Removes the unused opencv-python>=4.8 direct dependency; FlashVSR does not import cv2 directly, so the removal is safe.
integrations/omnidreams/ludus-renderer/pyproject.toml Switches the dev extra from opencv-python>=4.5 to opencv-python-headless>=4.5; constraint unchanged, only the distribution name changes.
integrations/omnidreams/ludus-renderer/uv.lock Regenerated standalone lockfile; replaces opencv-python 4.13.0.92 with opencv-python-headless 5.0.0.93 — a major version jump that was not exercised by running the ludus-renderer dev test suite.
uv.lock Workspace lockfile removes the opencv-python 4.13.0.92 entry and updates ludus-renderer's dev entry to opencv-python-headless; existing headless 4.13.0.92 wheel for the workspace is retained.

Comments Outside Diff (1)

  1. integrations/omnidreams/ludus-renderer/uv.lock, line 164-191 (link)

    P2 Standalone lockfile jumps to OpenCV 5.0 — dev tests not verified

    When uv lock was regenerated for the standalone project it resolved opencv-python-headless to 5.0.0.93 (up from the 4.13.0.92 that opencv-python was pinned to). The workspace lockfile retains 4.13.0.92. The PR description validates uv lock --check and the workspace CPU policy test, but does not mention running pytest against the standalone lockfile (e.g. uv run --project integrations/omnidreams/ludus-renderer --group dev pytest). If any ludus-renderer dev test exercises OpenCV 4.x APIs that were renamed or removed in 5.0, those tests will fail only in the standalone environment and pass in the workspace — a silent drift between the two lock contexts.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "Standardize workspace on headless OpenCV" | Re-trigger Greptile

@gtong-nv

Copy link
Copy Markdown
Collaborator

/ok to test 55980b2

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.

3 participants