diff --git a/.github/actions/setup-poetry/action.yml b/.github/actions/setup-poetry/action.yml index 473326dc..9512b012 100644 --- a/.github/actions/setup-poetry/action.yml +++ b/.github/actions/setup-poetry/action.yml @@ -14,6 +14,9 @@ runs: with: python-version: ${{ inputs.python-version }} cache: 'poetry' + - name: Update lockfile + run: poetry update + shell: bash - name: Install dependencies run: poetry install --all-extras shell: bash diff --git a/pyproject.toml b/pyproject.toml index ac3f0aa2..c205ec76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ packages = [{ include = "docling" }] ###################### # actual dependencies: ###################### -python = "^3.10" +python = "^3.9" pydantic = "^2.0.0" docling-core = {extras = ["chunking"], version = "^2.24.1"} docling-ibm-models = "^3.4.0" diff --git a/tests/test_e2e_ocr_conversion.py b/tests/test_e2e_ocr_conversion.py index 2b575025..d3f3f4a9 100644 --- a/tests/test_e2e_ocr_conversion.py +++ b/tests/test_e2e_ocr_conversion.py @@ -63,7 +63,6 @@ def test_e2e_conversions(): TesseractOcrOptions(), TesseractCliOcrOptions(), EasyOcrOptions(force_full_page_ocr=True), - OnnxtrOcrOptions(force_full_page_ocr=True), TesseractOcrOptions(force_full_page_ocr=True), TesseractOcrOptions(force_full_page_ocr=True, lang=["auto"]), TesseractCliOcrOptions(force_full_page_ocr=True), @@ -75,6 +74,11 @@ def test_e2e_conversions(): engines.append(RapidOcrOptions()) engines.append(RapidOcrOptions(force_full_page_ocr=True)) + # onnxtr is only available for Python >=3.10 + if sys.version_info >= (3, 10): + engines.append(OnnxtrOcrOptions()) + engines.append(OnnxtrOcrOptions(force_full_page_ocr=True)) + # only works on mac if "darwin" == sys.platform: engines.append(OcrMacOptions())