From 2e9401879a1395e5233fbde362a8a0c5c428afe4 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 4 Aug 2026 23:14:14 +0000 Subject: [PATCH] python3Packages.docling-jobkit: 1.8.1 -> 3.2.0 Diff: https://github.com/docling-project/docling-jobkit/compare/v1.8.1...v3.2.0 Changelog: https://github.com/docling-project/docling-jobkit/blob/v3.2.0/CHANGELOG.md --- .../python-modules/docling-jobkit/default.nix | 111 ++++++++++++------ 1 file changed, 75 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/docling-jobkit/default.nix b/pkgs/development/python-modules/docling-jobkit/default.nix index c4157254da97..20277e7b59b5 100644 --- a/pkgs/development/python-modules/docling-jobkit/default.nix +++ b/pkgs/development/python-modules/docling-jobkit/default.nix @@ -3,92 +3,131 @@ stdenv, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, + pythonOlder, # build-system hatchling, - poetry-core, # dependencies - docling, - pydantic-settings, - typer, boto3, - pandas, - fastparquet, - pyarrow, + docling-slim, httpx, + pandas, + pydantic-settings, - # optional dependencies - ray, + # optional-dependencies + # rq: rq, msgpack, + # ray: + redis, + psutil, + ray, + # gdrive: + google-api-python-client, + google-auth-oauthlib, + # gcloudstorage: + google-cloud-storage, + # azure: + azure-storage-blob, + # opensearch: + opensearch-py, # tests - pytestCheckHook, + aiohttp, pytest-asyncio, + pytestCheckHook, + starlette, + redisTestHook, writableTmpDirAsHomeHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "docling-jobkit"; - version = "1.8.1"; + version = "3.2.0"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "docling-project"; repo = "docling-jobkit"; - tag = "v${version}"; - hash = "sha256-9DzQY/XMmx/8XP1bMYZYl+Bp7AVcYfuv3MtO6lvQ/24="; + tag = "v${finalAttrs.version}"; + hash = "sha256-4OUNDn90jGWqHcs9QPpOKqYnKDxH+N/YUeszY21nhMo="; }; build-system = [ hatchling - poetry-core ]; - dependencies = [ - docling - pydantic-settings - typer - boto3 - pandas - fastparquet - pyarrow - httpx + pythonRelaxDeps = [ + "pandas" ]; + dependencies = [ + boto3 + docling-slim + httpx + pandas + pydantic-settings + ] + ++ docling-slim.optional-dependencies.standard; optional-dependencies = { - ray = [ ray ]; + vlm = docling-slim.optional-dependencies.models-vlm-inline; rq = [ rq msgpack ]; + ray = [ + msgpack + psutil + ray + ] + ++ ray.optional-dependencies.serve + ++ redis.optional-dependencies.hiredis + ++ lib.optionals ((pythonAtLeast "3.11") && (pythonOlder "3.14")) [ + # cloudflare-sdk + ]; + gdrive = [ + google-api-python-client + google-auth-oauthlib + ]; + gcloudstorage = [ + google-cloud-storage + ]; + azure = [ + azure-storage-blob + ]; + opensearch = [ + opensearch-py + ]; }; - pythonRelaxDeps = [ - "boto3" - "pandas" - "pyarrow" - ]; - pythonImportsCheck = [ "docling" "docling_jobkit" ]; nativeCheckInputs = [ - pytestCheckHook + aiohttp pytest-asyncio + pytestCheckHook + ray + redisTestHook + starlette writableTmpDirAsHomeHook ] - ++ optional-dependencies.rq; + ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; disabledTests = [ # requires network access "test_chunk_file" + "test_chunker_manager_shared_across_workers" + "test_clear_converters_clears_caches" "test_convert_file" - "test_convert_warmup" "test_convert_url" + "test_convert_warmup" + "test_convert_with_callbacks" "test_replicated_convert" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ @@ -98,10 +137,10 @@ buildPythonPackage rec { ]; meta = { - changelog = "https://github.com/docling-project/docling-jobkit/blob/${src.tag}/CHANGELOG.md"; description = "Running a distributed job processing documents with Docling"; homepage = "https://github.com/docling-project/docling-jobkit"; + changelog = "https://github.com/docling-project/docling-jobkit/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ codgician ]; }; -} +})