Skip to content

Commit

Permalink
Ensure import backwards-compatibility for PipelineOptions
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Auer <[email protected]>
  • Loading branch information
cau-git committed Sep 26, 2024
1 parent a30a520 commit 5843f1e
Show file tree
Hide file tree
Showing 3 changed files with 607 additions and 566 deletions.
4 changes: 4 additions & 0 deletions docling/datamodel/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
from typing_extensions import Self

from docling.backend.abstract_backend import PdfPageBackend
from docling.datamodel.pipeline_options import ( # Must be imported here for backward compatibility.
PipelineOptions,
TableStructureOptions,
)


class ConversionStatus(str, Enum):
Expand Down
3 changes: 1 addition & 2 deletions examples/custom_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

from docling.backend.docling_parse_backend import DoclingParseDocumentBackend
from docling.backend.pypdfium2_backend import PyPdfiumDocumentBackend
from docling.datamodel.base_models import ConversionStatus
from docling.datamodel.base_models import ConversionStatus, PipelineOptions
from docling.datamodel.document import ConversionResult, DocumentConversionInput
from docling.datamodel.pipeline_options import PipelineOptions
from docling.document_converter import DocumentConverter

_log = logging.getLogger(__name__)
Expand Down
Loading

0 comments on commit 5843f1e

Please sign in to comment.