Unverified Commit af0c7c75 authored by Yt's avatar Yt Committed by GitHub
Browse files

python312Packages.docling: 2.23.0 -> 2.25.1 (#386660)

parents 7768e6b9 4c5af104
Loading
Loading
Loading
Loading
+29 −21
Original line number Diff line number Diff line
@@ -2,31 +2,40 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  poetry-core,

  # dependencies
  torch,
  torchvision,
  transformers,
  docling-core,
  huggingface-hub,
  jsonlines,
  numpy,
  opencv-python-headless,
  pillow,
  tqdm,
  pydantic,
  safetensors,
  torch,
  torchvision,
  tqdm,
  transformers,

  # tests
  datasets,
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "docling-ibm-models";
  version = "3.3.2";
  version = "3.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "DS4SD";
    repo = "docling-ibm-models";
    tag = "v${version}";
    hash = "sha256-8mqDgbTj5g6jXEumj16Me9NjHLCOdR+pXmAwn2dghfg=";
    hash = "sha256-IgKP+4en0N6xLBjzwmddDk8z5P3J1vo+UMW+65a01Ww=";
  };

  build-system = [
@@ -34,21 +43,21 @@ buildPythonPackage rec {
  ];

  dependencies = [
    torch
    torchvision
    transformers
    numpy
    docling-core
    huggingface-hub
    jsonlines
    pillow
    tqdm
    numpy
    opencv-python-headless
    huggingface-hub
    pillow
    pydantic
    safetensors
    torch
    torchvision
    tqdm
    transformers
  ];

  pythonRelaxDeps = [
    "pillow"
    "torchvision"
    "transformers"
    "numpy"
  ];
@@ -58,19 +67,18 @@ buildPythonPackage rec {
  ];

  nativeCheckInputs = [
    datasets
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  preCheck = ''
    export HOME="$TEMPDIR"
  '';

  disabledTests = [
    # Requires network access
    "test_layoutpredictor"
    "test_tf_predictor"
    "test_code_formula_predictor" # huggingface_hub.errors.LocalEntryNotFoundError
    "test_figure_classifier" # huggingface_hub.errors.LocalEntryNotFoundError
    "test_layoutpredictor"
    "test_readingorder"
    "test_tf_predictor"
  ];

  meta = {
+16 −5
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@
  # dependencies
  beautifulsoup4,
  certifi,
  deepsearch-glm,
  docling-core,
  docling-ibm-models,
  docling-parse,
@@ -49,14 +48,14 @@

buildPythonPackage rec {
  pname = "docling";
  version = "2.23.0";
  version = "2.25.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "DS4SD";
    repo = "docling";
    tag = "v${version}";
    hash = "sha256-ySywKaLxjtgQM7RtzJrxZDS3z8uMwAwPDYO51uKHT28=";
    hash = "sha256-uJZIwXVwGd9xDBQkZ/uz2XLJ+lL1ZAZHJv/jHtW/LCk=";
  };

  build-system = [
@@ -66,7 +65,6 @@ buildPythonPackage rec {
  dependencies = [
    beautifulsoup4
    certifi
    deepsearch-glm
    docling-core
    docling-ibm-models
    docling-parse
@@ -133,6 +131,19 @@ buildPythonPackage rec {
    "test_e2e_pdfs_conversions" # AssertionError: ## TableFormer: Table Structure Understanding with Transf
    "test_e2e_conversions" # RuntimeError: Tesseract is not available

    # AssertionError
    # assert doc.export_to_markdown() == pair[1], f"Error in case {idx}"
    "test_ordered_lists"

    # AssertionError: export to md
    "test_e2e_html_conversions"

    # AssertionError: assert 'Unordered li...d code block:' == 'Unordered li...d code block:'
    "test_convert_valid"

    # AssertionError: Markdown file mismatch against groundtruth pftaps057006474.md
    "test_patent_groundtruth"

    # huggingface_hub.errors.LocalEntryNotFoundError: An error happened
    "test_cli_convert"
    "test_code_and_formula_conversion"
@@ -152,7 +163,7 @@ buildPythonPackage rec {
  meta = {
    description = "Get your documents ready for gen AI";
    homepage = "https://github.com/DS4SD/docling";
    changelog = "https://github.com/DS4SD/docling/blob/${src.rev}/CHANGELOG.md";
    changelog = "https://github.com/DS4SD/docling/blob/v${version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ happysalada ];
    mainProgram = "docling";