mmar-mapi 1.0.20__tar.gz → 1.0.22__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 mmar-mapi might be problematic. Click here for more details.
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/PKG-INFO +1 -1
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/pyproject.toml +1 -1
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/api.py +9 -3
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/LICENSE +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/README.md +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/__init__.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/decorators_maybe_lru_cache.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/file_storage.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/__init__.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/base.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/chat.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/chat_item.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/enums.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/tracks.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/models/widget.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/type_union.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/utils.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/utils_import.py +0 -0
- {mmar_mapi-1.0.20 → mmar_mapi-1.0.22}/src/mmar_mapi/xml_parser.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mmar-mapi"
|
|
3
3
|
# dynamic version is not supported yet on uv_build
|
|
4
|
-
version = "1.0.
|
|
4
|
+
version = "1.0.22"
|
|
5
5
|
description = "Common pure/IO utilities for multi-modal architectures team"
|
|
6
6
|
authors = [{name = "Eugene Tagin", email = "tagin@airi.net"}]
|
|
7
7
|
license = "MIT"
|
|
@@ -71,12 +71,18 @@ class TextExtractorAPI:
|
|
|
71
71
|
raise NotImplementedError
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
def _validate_page_range(v: tuple[int, int]) -> tuple[int, int]:
|
|
75
|
+
if v[0] < 1 or v[1] < v[0]:
|
|
76
|
+
raise ValueError("Invalid page range: start must be ≥ 1 and end must be ≥ start.")
|
|
77
|
+
return v
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
PageRange = Annotated[tuple[int, int], AfterValidator(_validate_page_range)]
|
|
75
81
|
ForceOCR = StrEnum("ForceOCR", ["ENABLED", "DISABLED", "AUTO"])
|
|
76
82
|
OutputType = StrEnum("OutputType", ["RAW", "PLAIN", "MARKDOWN"])
|
|
77
83
|
|
|
78
84
|
|
|
79
|
-
class ExtractionEngineSpec(BaseModel):
|
|
85
|
+
class ExtractionEngineSpec(BaseModel, frozen=True):
|
|
80
86
|
output_type: OutputType = OutputType.MARKDOWN
|
|
81
87
|
force_ocr: ForceOCR = ForceOCR.AUTO
|
|
82
88
|
do_ocr: bool = False
|
|
@@ -88,7 +94,7 @@ class ExtractionEngineSpec(BaseModel):
|
|
|
88
94
|
images_scale: float = 2.0
|
|
89
95
|
|
|
90
96
|
|
|
91
|
-
class DocExtractionSpec(BaseModel):
|
|
97
|
+
class DocExtractionSpec(BaseModel, frozen=True):
|
|
92
98
|
page_range: PageRange | None = None
|
|
93
99
|
engine: ExtractionEngineSpec = ExtractionEngineSpec()
|
|
94
100
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|