From 8a0cc04181e6a028d576a0e415b4a763088a8199 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Thu, 27 Nov 2025 16:22:37 +0200 Subject: [PATCH] Add opencv-python-headless to docling optional dependency, required for TableStructureModel which uses TableFormer for table detection. --- CHANGELOG.md | 1 + haiku_rag_slim/pyproject.toml | 2 +- pyproject.toml | 4 +++- uv.lock | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25c3738..d71dedf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Fixed - **OCR Options**: Fixed `DoclingLocalConverter` using base `OcrOptions` class which docling's OCR factory doesn't recognize. Now uses `OcrAutoOptions` for automatic OCR engine selection. +- **Dependencies**: Added `opencv-python-headless` to the `docling` optional dependency for table structure detection. ## [0.19.2] - 2025-11-27 diff --git a/haiku_rag_slim/pyproject.toml b/haiku_rag_slim/pyproject.toml index 6466a140..c3e042cf 100644 --- a/haiku_rag_slim/pyproject.toml +++ b/haiku_rag_slim/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ [project.optional-dependencies] # Document processing -docling = ["docling==2.62.0"] +docling = ["docling==2.62.0", "opencv-python-headless>=4.11.0.86"] # Embedding providers voyageai = ["voyageai>=0.3.5"] # Rerankers diff --git a/pyproject.toml b/pyproject.toml index 7072d673..d34a47af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,9 @@ classifiers = [ "Typing :: Typed", ] -dependencies = ["haiku.rag-slim[docling,voyageai,mxbai,cohere,zeroentropy,inspector]==0.19.3"] +dependencies = [ + "haiku.rag-slim[docling,voyageai,mxbai,cohere,zeroentropy,inspector]==0.19.3", +] [project.scripts] haiku-rag = "haiku.rag.cli:cli" diff --git a/uv.lock b/uv.lock index b0ea6065..fdf211a3 100644 --- a/uv.lock +++ b/uv.lock @@ -1361,6 +1361,7 @@ cohere = [ ] docling = [ { name = "docling" }, + { name = "opencv-python-headless" }, ] google = [ { name = "pydantic-ai-slim", extra = ["google"] }, @@ -1395,6 +1396,7 @@ requires-dist = [ { name = "httpx", specifier = ">=0.28.1" }, { name = "lancedb", specifier = "==0.25.3" }, { name = "mxbai-rerank", marker = "extra == 'mxbai'", specifier = ">=0.1.6" }, + { name = "opencv-python-headless", marker = "extra == 'docling'", specifier = ">=4.11.0.86" }, { name = "pathspec", specifier = ">=0.12.1" }, { name = "pydantic", specifier = ">=2.12.4" }, { name = "pydantic-ai-slim", extras = ["anthropic"], marker = "extra == 'anthropic'" }, @@ -2770,7 +2772,7 @@ name = "opencv-python-headless" version = "4.11.0.86" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "numpy", marker = "python_full_version >= '3.14' and python_full_version < '4'" }, + { name = "numpy" }, ] sdist = { url = "https://files.pythonhosted.org/packages/36/2f/5b2b3ba52c864848885ba988f24b7f105052f68da9ab0e693cc7c25b0b30/opencv-python-headless-4.11.0.86.tar.gz", hash = "sha256:996eb282ca4b43ec6a3972414de0e2331f5d9cda2b41091a49739c19fb843798", size = 95177929, upload-time = "2025-01-16T13:53:40.22Z" } wheels = [