extract-python 0.11.1__tar.gz → 0.11.3__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.
Files changed (21) hide show
  1. {extract_python-0.11.1 → extract_python-0.11.3}/PKG-INFO +2 -2
  2. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/miner_u.py +6 -3
  3. {extract_python-0.11.1 → extract_python-0.11.3}/pyproject.toml +1 -1
  4. {extract_python-0.11.1 → extract_python-0.11.3}/.gitignore +0 -0
  5. {extract_python-0.11.1 → extract_python-0.11.3}/.python-version +0 -0
  6. {extract_python-0.11.1 → extract_python-0.11.3}/README.md +0 -0
  7. {extract_python-0.11.1 → extract_python-0.11.3}/benches/__init__.py +0 -0
  8. {extract_python-0.11.1 → extract_python-0.11.3}/benches/compare.ipynb +0 -0
  9. {extract_python-0.11.1 → extract_python-0.11.3}/benches/compare.py +0 -0
  10. {extract_python-0.11.1 → extract_python-0.11.3}/benches/constants.py +0 -0
  11. {extract_python-0.11.1 → extract_python-0.11.3}/data/.gitignore +0 -0
  12. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/__init__.py +0 -0
  13. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/__main__.py +0 -0
  14. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/cli/__init__.py +0 -0
  15. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/cli/doc.py +0 -0
  16. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/cli/utils.py +0 -0
  17. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/constants.py +0 -0
  18. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/docling_.py +0 -0
  19. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/marker_.py +0 -0
  20. {extract_python-0.11.1 → extract_python-0.11.3}/extract_python/utils.py +0 -0
  21. {extract_python-0.11.1 → extract_python-0.11.3}/uv.lock +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: extract-python
3
- Version: 0.11.1
3
+ Version: 0.11.3
4
4
  Summary: Structured content extraction
5
5
  Project-URL: Homepage, https://github.com/ICIJ/extract-python
6
6
  Project-URL: Repository, https://github.com/ICIJ/extract-python
7
7
  Project-URL: Issues, https://github.com/ICIJ/extract-python/issues
8
8
  Author-email: Clément Doumouro <cdoumouro@icij.org>
9
9
  Requires-Python: <3.15,>=3.13
10
- Requires-Dist: extract-core~=0.11.0
10
+ Requires-Dist: extract-core~=0.11.3
11
11
  Requires-Dist: icij-common~=0.8.2
12
12
  Requires-Dist: pympler~=1.1
13
13
  Provides-Extra: benches
@@ -16,7 +16,8 @@ from extract_core import (
16
16
  Result,
17
17
  Status,
18
18
  )
19
- from mineru import MiddleJson, ParseResult
19
+ from mineru import MiddleJson, MinerUParser, ParseResult
20
+ from mineru.config import VlmConfig
20
21
 
21
22
  from .constants import ARTIFACTS, DEFAULT_MD_PAGE_SEP
22
23
  from .utils import path_to_artifacts_dirname, reset_env, write_pages
@@ -34,18 +35,20 @@ class MinerUPipeline(Pipeline):
34
35
  async def extract_content(
35
36
  self, docs: Iterable[InputDoc], output_format: OutputFormat, output_path: Path
36
37
  ) -> AsyncIterable[Result]:
37
- from mineru import MinerUParser # noqa: PLC0415
38
38
 
39
39
  with reset_env():
40
40
  os.environ["MINERU_DEVICE_MODE"] = self._device
41
41
  # TODO: exclude files which are not pdf and return an error
42
42
  # TODO: we should only process valid PDFs
43
43
  config = self._config.config
44
+ vlm_config = None
45
+ if config.vlm_config is not None:
46
+ vlm_config = VlmConfig.model_validate(config.vlm_config)
44
47
  parser = MinerUParser(
45
48
  tier=config.tier,
46
49
  parse_mode=config.parse_mode,
47
50
  image_analysis=config.image_analysis,
48
- vlm_config=config.vlm_config,
51
+ vlm_config=vlm_config,
49
52
  )
50
53
  for doc in docs:
51
54
  res = await parser.parse_async(doc.path)
@@ -8,7 +8,7 @@ authors = [
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.13,<3.15"
10
10
  dependencies = [
11
- "extract-core~=0.11.0",
11
+ "extract-core~=0.11.3",
12
12
  "icij-common~=0.8.2",
13
13
  "pympler~=1.1",
14
14
  ]
File without changes