docling-core 1.1.0__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of docling-core might be problematic. Click here for more details.

Files changed (45) hide show
  1. {docling_core-1.1.0 → docling_core-1.1.2}/PKG-INFO +14 -15
  2. {docling_core-1.1.0 → docling_core-1.1.2}/README.md +13 -14
  3. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/search/package.py +1 -1
  4. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/base.py +5 -5
  5. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/document.py +3 -3
  6. {docling_core-1.1.0 → docling_core-1.1.2}/pyproject.toml +2 -2
  7. {docling_core-1.1.0 → docling_core-1.1.2}/LICENSE +0 -0
  8. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/__init__.py +0 -0
  9. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/py.typed +0 -0
  10. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/doc/ANN.json +0 -0
  11. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/doc/DOC.json +0 -0
  12. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/doc/OCR-output.json +0 -0
  13. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/doc/RAW.json +0 -0
  14. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/generated/ccs_document_schema.json +0 -0
  15. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/generated/minimal_document_schema_flat.json +0 -0
  16. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/search/search_doc_mapping.json +0 -0
  17. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/resources/schemas/search/search_doc_mapping_v2.json +0 -0
  18. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/search/__init__.py +0 -0
  19. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/search/json_schema_to_search_mapper.py +0 -0
  20. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/search/mapping.py +0 -0
  21. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/search/meta.py +0 -0
  22. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/__init__.py +0 -0
  23. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/base.py +0 -0
  24. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/__init__.py +0 -0
  25. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/doc_ann.py +0 -0
  26. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/doc_ocr.py +0 -0
  27. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/doc/doc_raw.py +0 -0
  28. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/gen/__init__.py +0 -0
  29. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/gen/generic.py +0 -0
  30. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/nlp/__init__.py +0 -0
  31. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/nlp/qa.py +0 -0
  32. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/nlp/qa_labels.py +0 -0
  33. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/__init__.py +0 -0
  34. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/attribute.py +0 -0
  35. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/base.py +0 -0
  36. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/predicate.py +0 -0
  37. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/record.py +0 -0
  38. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/statement.py +0 -0
  39. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/types/rec/subject.py +0 -0
  40. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/__init__.py +0 -0
  41. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/alias.py +0 -0
  42. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/ds_generate_docs.py +0 -0
  43. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/ds_generate_jsonschema.py +0 -0
  44. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/validate.py +0 -0
  45. {docling_core-1.1.0 → docling_core-1.1.2}/docling_core/utils/validators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-core
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A python library to define and validate data types in Docling.
5
5
  Home-page: https://ds4sd.github.io/
6
6
  License: MIT
@@ -35,36 +35,35 @@ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
35
35
  Project-URL: Repository, https://github.com/DS4SD/docling-core
36
36
  Description-Content-Type: text/markdown
37
37
 
38
+ # Docling Core
39
+
38
40
  [![PyPI version](https://img.shields.io/pypi/v/docling-core)](https://pypi.org/project/docling-core/)
39
- ![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-blue)
41
+ ![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
40
42
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
41
43
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
42
44
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
43
45
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
44
46
  [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
45
47
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
46
- [![License MIT](https://img.shields.io/github/license/ds4sd/deepsearch-toolkit)](https://opensource.org/licenses/MIT)
47
-
48
- # Docling Core
48
+ [![License MIT](https://img.shields.io/github/license/ds4sd/docling-core)](https://opensource.org/licenses/MIT)
49
49
 
50
50
  Docling Core is a library that defines the data types in [Docling](https://ds4sd.github.io), leveraging pydantic models.
51
51
 
52
52
  ## Installation
53
53
 
54
- Using [Poetry](https://python-poetry.org), create and activate a virtual environment.
55
-
56
- ```
57
- poetry shell
54
+ To use Docling Core, simply install `docling-core` from your package manager, e.g. pip:
55
+ ```bash
56
+ pip install docling-core
58
57
  ```
59
58
 
60
- Install the defined dependencies of the project.
59
+ ### Development setup
61
60
 
62
- ```
61
+ To develop for Docling Core, you need Python 3.9 / 3.10 / 3.11 / 3.12 and Poetry. You can then install from your local clone's root dir:
62
+ ```bash
63
63
  poetry install
64
64
  ```
65
65
 
66
- Test the installation running the pytest suite.
67
-
66
+ To run the pytest suite, execute:
68
67
  ```
69
68
  poetry run pytest test
70
69
  ```
@@ -114,7 +113,7 @@ Please read [Contributing to Docling Core](./CONTRIBUTING.md) for details.
114
113
 
115
114
  ## References
116
115
 
117
- If you use `Docling Core` in your projects, please consider citing the following:
116
+ If you use Docling Core in your projects, please consider citing the following:
118
117
 
119
118
  ```bib
120
119
  @software{Docling,
@@ -129,6 +128,6 @@ year = {2024}
129
128
 
130
129
  ## License
131
130
 
132
- The `Docling Core` codebase is under MIT license.
131
+ The Docling Core codebase is under MIT license.
133
132
  For individual model usage, please refer to the model licenses found in the original packages.
134
133
 
@@ -1,33 +1,32 @@
1
+ # Docling Core
2
+
1
3
  [![PyPI version](https://img.shields.io/pypi/v/docling-core)](https://pypi.org/project/docling-core/)
2
- ![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-blue)
4
+ ![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
3
5
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
4
6
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5
7
  [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
6
8
  [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
7
9
  [![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
8
10
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
9
- [![License MIT](https://img.shields.io/github/license/ds4sd/deepsearch-toolkit)](https://opensource.org/licenses/MIT)
10
-
11
- # Docling Core
11
+ [![License MIT](https://img.shields.io/github/license/ds4sd/docling-core)](https://opensource.org/licenses/MIT)
12
12
 
13
13
  Docling Core is a library that defines the data types in [Docling](https://ds4sd.github.io), leveraging pydantic models.
14
14
 
15
15
  ## Installation
16
16
 
17
- Using [Poetry](https://python-poetry.org), create and activate a virtual environment.
18
-
19
- ```
20
- poetry shell
17
+ To use Docling Core, simply install `docling-core` from your package manager, e.g. pip:
18
+ ```bash
19
+ pip install docling-core
21
20
  ```
22
21
 
23
- Install the defined dependencies of the project.
22
+ ### Development setup
24
23
 
25
- ```
24
+ To develop for Docling Core, you need Python 3.9 / 3.10 / 3.11 / 3.12 and Poetry. You can then install from your local clone's root dir:
25
+ ```bash
26
26
  poetry install
27
27
  ```
28
28
 
29
- Test the installation running the pytest suite.
30
-
29
+ To run the pytest suite, execute:
31
30
  ```
32
31
  poetry run pytest test
33
32
  ```
@@ -77,7 +76,7 @@ Please read [Contributing to Docling Core](./CONTRIBUTING.md) for details.
77
76
 
78
77
  ## References
79
78
 
80
- If you use `Docling Core` in your projects, please consider citing the following:
79
+ If you use Docling Core in your projects, please consider citing the following:
81
80
 
82
81
  ```bib
83
82
  @software{Docling,
@@ -92,5 +91,5 @@ year = {2024}
92
91
 
93
92
  ## License
94
93
 
95
- The `Docling Core` codebase is under MIT license.
94
+ The Docling Core codebase is under MIT license.
96
95
  For individual model usage, please refer to the model licenses found in the original packages.
@@ -26,7 +26,7 @@ class Package(BaseModel, extra="forbid"):
26
26
  The version needs to comply with Semantic Versioning 2.0.0.
27
27
  """
28
28
 
29
- name: StrictStr
29
+ name: StrictStr = "docling-core"
30
30
  version: Annotated[str, StringConstraints(strict=True, pattern=VERSION_PATTERN)] = (
31
31
  importlib.metadata.version("docling-core")
32
32
  )
@@ -6,7 +6,7 @@
6
6
  """Define common models across CCS objects."""
7
7
  from typing import Annotated, Literal, Optional, Union
8
8
 
9
- from pydantic import BaseModel, Field, StrictStr
9
+ from pydantic import BaseModel, Field, PositiveInt, StrictStr
10
10
 
11
11
  from docling_core.search.mapping import es_field
12
12
  from docling_core.utils.alias import AliasModel
@@ -39,7 +39,7 @@ class S3Resource(BaseModel):
39
39
 
40
40
  mime: str
41
41
  path: str
42
- page: Optional[int] = None
42
+ page: Optional[PositiveInt] = None
43
43
 
44
44
 
45
45
  class S3Data(AliasModel):
@@ -68,7 +68,7 @@ class Prov(AliasModel):
68
68
  """Provenance."""
69
69
 
70
70
  bbox: BoundingBox
71
- page: int
71
+ page: PositiveInt
72
72
  span: Span
73
73
  ref_s3_data: Optional[StrictStr] = Field(
74
74
  default=None, alias="__ref_s3_data", json_schema_extra=es_field(suppress=True)
@@ -96,7 +96,7 @@ class PageDimensions(BaseModel):
96
96
  """Page dimensions."""
97
97
 
98
98
  height: float
99
- page: int
99
+ page: PositiveInt
100
100
  width: float
101
101
 
102
102
 
@@ -196,4 +196,4 @@ class PageReference(BaseModel):
196
196
 
197
197
  hash: str = Field(json_schema_extra=es_field(type="keyword", ignore_above=8191))
198
198
  model: str = Field(json_schema_extra=es_field(suppress=True))
199
- page: int = Field(json_schema_extra=es_field(type="short"))
199
+ page: PositiveInt = Field(json_schema_extra=es_field(type="short"))
@@ -263,7 +263,7 @@ class MinimalDocument(
263
263
  """Minimal model for a document."""
264
264
 
265
265
  name: StrictStr = Field(alias="_name")
266
- obj_type: StrictStr = Field("document", alias="type")
266
+ obj_type: Optional[StrictStr] = Field("document", alias="type")
267
267
  description: CCSDocumentDescription[
268
268
  DescriptionAdvancedT,
269
269
  DescriptionAnalyticsT,
@@ -291,7 +291,7 @@ class CCSDocument(
291
291
  ):
292
292
  """Model for a CCS-generated document."""
293
293
 
294
- obj_type: StrictStr = Field("pdf-document", alias="type")
294
+ obj_type: Optional[StrictStr] = Field("pdf-document", alias="type")
295
295
  bitmaps: Optional[list[BitmapObject]] = None
296
296
  equations: Optional[list[BaseCell]] = None
297
297
  footnotes: Optional[list[BaseText]] = None
@@ -355,7 +355,7 @@ class ExportedCCSDocument(
355
355
  ):
356
356
  """Document model for Docling."""
357
357
 
358
- obj_type: StrictStr = Field(
358
+ obj_type: Optional[StrictStr] = Field(
359
359
  "pdf-document",
360
360
  alias="type",
361
361
  json_schema_extra=es_field(type="keyword", ignore_above=8191),
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "docling-core"
3
- version = "1.1.0"
3
+ version = "1.1.2"
4
4
  description = "A python library to define and validate data types in Docling."
5
5
  license = "MIT"
6
6
  authors = [
@@ -58,7 +58,7 @@ tabulate = "^0.9.0"
58
58
  [tool.poetry.group.dev.dependencies]
59
59
  black = "^24.4.2"
60
60
  pytest = "^7.1.2"
61
- mypy = "^v1.6.0"
61
+ mypy = "^1.6.0"
62
62
  isort = "^5.10.1"
63
63
  pre-commit = "^3.7.1"
64
64
  autoflake = "^2.0.0"
File without changes