From e3380f375648ccf2c276a8f7459c460a4a2b26dc Mon Sep 17 00:00:00 2001 From: Antonio-Faure <209759495+Antonio-Faure@users.noreply.github.com> Date: Sun, 1 Nov 2026 21:36:04 +0100 Subject: [PATCH] fix(deps): make the Docling parser installable in the official image --- deeptutor/modules/manifests/parser-docling.json | 2 +- requirements/modules/parser-docling.txt | 2 +- tests/services/parsing/test_engines.py | 2 +- tests/test_packaging_metadata.py | 13 ++++++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/deeptutor/modules/manifests/parser-docling.json b/deeptutor/modules/manifests/parser-docling.json index a4fa38276..338f3f39f 100644 --- a/deeptutor/modules/manifests/parser-docling.json +++ b/deeptutor/modules/manifests/parser-docling.json @@ -16,7 +16,7 @@ "services": [], "requirements": [ "docling[xbrl]>=2.123.1", - "docling-slim[format-iwork,format-opendocument,format-video]>=2.123.1" + "docling-slim[format-iwork,format-opendocument]>=2.123.1" ], "executables": [], "parser_engine": "docling" diff --git a/requirements/modules/parser-docling.txt b/requirements/modules/parser-docling.txt index 0ea396806..253ba74fc 100644 --- a/requirements/modules/parser-docling.txt +++ b/requirements/modules/parser-docling.txt @@ -2,4 +2,4 @@ -r ../core.txt -r parsing.txt docling[xbrl]>=2.123.1 -docling-slim[format-iwork,format-opendocument,format-video]>=2.123.1 +docling-slim[format-iwork,format-opendocument]>=2.123.1 diff --git a/tests/services/parsing/test_engines.py b/tests/services/parsing/test_engines.py index d8079bba9..32e16fb5b 100644 --- a/tests/services/parsing/test_engines.py +++ b/tests/services/parsing/test_engines.py @@ -999,7 +999,7 @@ def test_install_manager_spec_allowlist() -> None: assert ENGINE_PIP_SPECS["liteparse"] == ["liteparse>=2.14.2"] assert ENGINE_PIP_SPECS["docling"] == [ "docling[xbrl]>=2.123.1", - "docling-slim[format-iwork,format-opendocument,format-video]>=2.123.1", + "docling-slim[format-iwork,format-opendocument]>=2.123.1", ] assert "text_only" not in ENGINE_PIP_SPECS assert "mineru" not in ENGINE_PIP_SPECS diff --git a/tests/test_packaging_metadata.py b/tests/test_packaging_metadata.py index 2b56d2bf1..a89246db4 100644 --- a/tests/test_packaging_metadata.py +++ b/tests/test_packaging_metadata.py @@ -34,6 +34,17 @@ def test_generated_source_dependency_files_are_current(): assert (ROOT / "requirements" / filename).read_text() == content +def test_docling_parser_avoids_source_only_build_dependencies(): + """The official image has no compiler. + + ``format-video`` pulls ``resemblyzer`` -> ``webrtcvad``, which ships only an + sdist. The document parser does not use Docling's video extras, so keep the + one-click install runnable in the published image (#2327). + """ + requirements = manifests()["parser-docling"]["requirements"] + assert all("format-video" not in requirement for requirement in requirements) + + @pytest.mark.parametrize( "module,requirement", [ @@ -53,7 +64,7 @@ def test_generated_source_dependency_files_are_current(): ("parser-pymupdf4llm", "pymupdf4llm>=1.28.2"), ("parser-liteparse", "liteparse>=2.14.2"), ("parser-docling", "docling[xbrl]>=2.123.1"), - ("parser-docling", "docling-slim[format-iwork,format-opendocument,format-video]>=2.123.1"), + ("parser-docling", "docling-slim[format-iwork,format-opendocument]>=2.123.1"), ], ) def test_dependency_floor_belongs_to_its_module(module, requirement):