Commit Graph
633 Commits
Author SHA1 Message Date
Christoph Auer 3a3f47ec1b fix: preserve superscripts and subscripts in Markdown export
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2026-09-14 10:55:53 +02:00
Michał GórnyandCesar Berrospi Ramis 6073888fb9 fix: Add missing dependency on requests (#764)
* fix: Add missing dependency on `requests`

Add an explicit dependency on `requests` since it is used in
`docling_core.utils.file` since 752cbc3.  Without it, the CLI tools fail
to run on a fresh install (e.g. via `uv pip install docling-core`):

```pytb
$ docling-view
Traceback (most recent call last):
  File "/tmp/.venv/bin/docling-view", line 4, in <module>
    from docling_core.cli.view import app
  File "/tmp/.venv/lib/python3.14/site-packages/docling_core/cli/view.py", line 13, in <module>
    from docling_core.utils.file import resolve_source_to_path
  File "/tmp/.venv/lib/python3.14/site-packages/docling_core/utils/file.py", line 11, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
```

Signed-off-by: Michał Górny <mgorny@quansight.com>

* Apply batched suggestions from code review

Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>

* Sync the lockfile

Signed-off-by: Michał Górny <mgorny@quansight.com>

---------

Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
2026-09-10 18:35:33 +02:00
github-actions[bot] 0b55aca55b chore: bump version to 2.96.0 [skip ci] v2.96.0 2026-09-10 12:15:06 +00:00
COTHSC 864036d545 feat: add DOCLINGCORE_ALLOWED_PRIVATE_IPS setting to allow private IPs (#608)
* feat: add DOCLINGCORE_ALLOWED_PRIVATE_IPS setting to allow private IP access

Signed-off-by: COTHSC <thierryscully.colomban@gmail.com>

* fix: address review feedback on private-IP allowlist

fix broken response in test_allowed_private_ips (use _closeable_response instead of Response)
document allowed_private_ips
widen _ip_in_allowlist typehint to include ipv6 addresses + add docstring
clarify the malformed entry logmessage to hint at strict CIDR parsing

Signed-off-by: COTHSC <thierryscully.colomban@gmail.com>

* fix: use strict=False with normalization warning for CIDR allowlist entries

Signed-off-by: COTHSC <thierryscully.colomban@gmail.com>

* style: apply ruff-format

Signed-off-by: COTHSC <thierryscully.colomban@gmail.com>

---------

Signed-off-by: COTHSC <thierryscully.colomban@gmail.com>
2026-09-10 14:04:28 +02:00
Anusha AcharyaandCesar Berrospi Ramis 9b23d315af fix(serializer): derive markdown table header rows from column_header flags (#723)
* fix(serializer): derive markdown table header rows from column_header flags

MarkdownTableSerializer hardcoded grid row 0 as the only header row, while
TableItem._export_to_dataframe_with_options, the HTML serializer and the OTSL
export all derive the header rows from TableCell.column_header. A table with a
stacked header therefore serialized to markdown with its lower header rows
demoted to data rows, and HybridChunker repeated only the first of them at the
top of each chunk of an oversized table.

Take the header row count from the flags and flatten those rows into the single
header row GFM allows, dropping the repeated text a cell spanning several header
rows produces. When no cell in the table carries column_header the previous
behavior is kept, since backends that never set the flag cannot be told apart
from genuinely headerless tables.

Signed-off-by: Anusha Acharya <acharyaanusha123@gmail.com>

* test(serializer): cover tables whose header flags start below row 0

The empty-header-block branch of _flatten_header_rows was the one line of the
patch left uncovered. Pin the behavior it produces: with no leading run of
flagged rows there is no header to promote, so the header is empty and every
row stays in the body rather than one being consumed.

Signed-off-by: Anusha Acharya <acharyaanusha123@gmail.com>

* fix(serializer): join stacked header cells with a documented separator

Review feedback: a blank space loses the boundary between header levels, so
"native backend" over "TTS" is indistinguishable from a single cell reading
"native backend TTS". Join with " - " instead, kept as a module constant, and
document the header-resolution contract on MarkdownTableSerializer.

Signed-off-by: Anusha Acharya <acharyaanusha123@gmail.com>

* fix(serializer): only count header rows a column header starts on

TableData.grid repeats a row-spanning cell into every row it covers, so a
header cell with row_span > 1 leaves a column_header-flagged cell in the data
rows beneath it. Counting every row that holds a flagged cell therefore pulled
those data rows into the header block, where they were flattened into the
column names and dropped from the body entirely.

Require that a header cell starts on the row, matching the same fix applied to
the DataFrame export in #756.

Signed-off-by: Anusha Acharya <acharyaanusha123@gmail.com>

* perf(serializer): avoid iterating grid twice; style and tests improvements

In '_count_header_rows' of the Markdown serializer, avoid iterating
the entire grid twice in all scenarios.
Strengthen docstrings in markdown serializer.
Add test for single header row with flags.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Anusha Acharya <acharyaanusha123@gmail.com>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-10 14:03:23 +02:00
Yiorgis Gozadinos ee120d4834 fix: set PNG compression level in OpenCV encoder (#759)
OpenCV's imencode defaults to compression level 1 while PIL's PNG encoder
defaults to 6, so PNGs from the cv2 path were 30-60% larger for identical
pixels. Regenerated the affected test ground truth.

Fixes #758

Signed-off-by: Yiorgis Gozadinos <ggozadinos@gmail.com>
2026-09-10 13:13:32 +02:00
Cesar Berrospi Ramis 278d13675b chore: add mhtml mimetypes (#763)
* chore: add mimetypes for MIME HTML (MHTML) files

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore: reduce verbosity in '_extra_mimetypes'

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-10 12:47:53 +02:00
Cesar Berrospi Ramis 840aba6b1a fix(webvtt): accept CR line terminator in verify_signature (#749)
fix(webvtt): accept CR line terminator in verify_signature per W3C spec

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-09 13:04:01 +02:00
Luciano Sant'Ana 17f1a958af fix: register AFP MIME types (#761)
Signed-off-by: Luciano Sant'Ana <lucsantana@gmail.com>
2026-09-09 11:44:48 +02:00
Cesar Berrospi Ramis 43e296a44e chore: add extra MIME types for Apple's productivity apps (#760)
Add MIME types (both standard and legacy) for Apple iWork (productivity apps):
Apple Pages, Apple Numbers, Apple Keynote

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-09 10:39:46 +02:00
Mohamad Fakhouri a1945f7d1f perf: reuse table grid during dataframe export (#754)
* perf: reuse table grid during dataframe export

Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>

* test: remove dataframe grid regression test

Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>

---------

Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
2026-09-08 13:13:55 +02:00
Mohamad Fakhouri a0949d7ded fix: preserve rows under spanning column headers (#756)
fix: preserve rows under spanning headers

Signed-off-by: Mohamad Fakhouri <mohamad.fakhouri@quantco.com>
2026-09-08 06:16:57 +02:00
github-actions[bot] a727420a05 chore: bump version to 2.95.0 [skip ci] v2.95.0 2026-09-04 15:16:51 +00:00
Peter W. J. Staar 4631492b67 feat: added PdfDestination to PdfTableOfContents (#747)
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-09-04 17:12:47 +02:00
Cesar Berrospi Ramis a59c38c1da chore: rename test folder to tests (#739)
test: rename 'test' folder to 'tests'

To align with other Docling repositories, use 'tests' for test modules.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-04 10:49:52 +02:00
Cesar Berrospi Ramis 0c46294fac style: modernize type hints with PEP 604 + dependency upgrades (#737)
* style: modernize type hints with PEP 604

Enforce Ruff UP007 and UP045 to align with PEP 604 (union types as X | Y).

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore: upgrade 'uv.lock' dependencies

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-04 06:31:04 +02:00
Cesar Berrospi Ramis 7a6c5a4114 fix(latex): prevent inline-group content from being serialized twice (#743)
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-04 06:30:55 +02:00
Cesar Berrospi Ramis 506acea868 fix: strip cue timestamp tags when parsing WebVTT cue text (#744)
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-04 06:30:50 +02:00
github-actions[bot] 1ba54dc894 chore: bump version to 2.94.1 [skip ci] v2.94.1 2026-09-03 11:26:06 +00:00
Peter W. J. Staar 80f6a87562 fix: relaxing transformers versions (#742)
* fix: relaxing transformers versions

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* relaxed transformers across the board

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-09-03 13:19:44 +02:00
github-actions[bot] 1da505741e chore: bump version to 2.94.0 [skip ci] v2.94.0 2026-09-03 08:50:27 +00:00
Peter W. J. Staar 9ccdb1e644 fix: exclude broken transformers versions (#741)
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-09-03 10:45:01 +02:00
maxandCesar Berrospi Ramis 4210158d49 fix(tokens): normalize inverted bbox in get_location instead of asserting (#676)
* fix(tokens): normalize inverted bbox in get_location instead of asserting

Near-degenerate elements (e.g. a thin rule whose layout-model regression
produced a slightly inverted bbox) could arrive with bbox[0] > bbox[2] or
bbox[1] > bbox[3]. The redundant asserts in DocumentToken.get_location
crashed export_to_doctags(add_location=True) on such boxes, even though the
method already normalizes ordering via min()/max() downstream. This bites
long documents in particular, where the odds of one degenerate element grow
with page count.

Sort the coordinates before normalization to mirror the existing min()/max()
behaviour, and drop the asserts. Adds regression tests for normal, partially
inverted (from the issue repro), and fully inverted bboxes.

Fixes #620

Signed-off-by: max <87073104+maxtaran2010@users.noreply.github.com>

* docs: fix get_location docstring grammar (give -> given)

Addresses review feedback on #676.

Signed-off-by: max <87073104+maxtaran2010@users.noreply.github.com>

* refactor(tokens): drop redundant min()/max() after bbox sort in get_location

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* docs(tokens): move get_location normalization note into docstring

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: max <87073104+maxtaran2010@users.noreply.github.com>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-02 10:16:55 +02:00
ccdffa7844 fix(markdown): escape referenced figures' filepaths and ensure cross-platform path handling (Windows / POSIX) (#698)
* fix regression from removal of #122 by #182

Signed-off-by: Laurier Lavoie-Giasson <laurier@laurier.dev>

* change classmethod to staticmethod

Signed-off-by: Laurier Lavoie-Giasson <laurier@laurier.dev>

* fix(markdown): apply PR comments

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Laurier Lavoie-Giasson <laurier@laurier.dev>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Laurier Lavoie-Giasson <laurier@laurier.dev>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-02 10:16:02 +02:00
bdfca5b89e fix: convert headings to plain text in table cells (#540)
* fix: convert headings to plain text in table cells (issue #2722)

Signed-off-by: 温可 <wenke@openclaw.ai>

* fix(serializer): accept 'in_table_cell' parameter in PlainTextTextSerializer

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(serializer): add test for headings in rich table cells

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* docs(serializer): add/improve docstrings

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(serializer): reduce verbosity with inline comments

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: 温可 <wenke@openclaw.ai>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: 温可 <wenke@openclaw.ai>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-02 10:15:51 +02:00
Abdur RafayandCesar Berrospi Ramis c057766c28 feat: expose json.dumps kwargs in save_as_json (#725)
* feat: expose json.dumps kwargs in save_as_json

Signed-off-by: Abdur Rafay <abdurrafay.tech@gmail.com>

* feat: add ensure_ascii and sort_keys to save_as_json

Signed-off-by: Abdur Rafay <abdurrafay.tech@gmail.com>

* docs(utils): add docstring to save_as_json

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(test): improve test on 'save_as_json'

Pin specific escaped token instead of broad \u assertion.
Replace weak sort_keys assertions with a roundtrip content check.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Abdur Rafay <abdurrafay.tech@gmail.com>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-02 10:15:28 +02:00
github-actions[bot] 7a0fdac234 chore: bump version to 2.93.0 [skip ci] v2.93.0 2026-09-01 10:46:46 +00:00
Peter W. J. Staar a222564ef8 fix: updated the doclang serializer for groups (#736)
* fix: updated the doclang serializer for groups

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the pre-commit

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-09-01 12:42:17 +02:00
Panos Vagenas dedc35da4c feat(markdown): make image class suppressible (#726)
* feat(markdown): make image class suppressible

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* propagate to `save_as_markdown()`

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-08-20 10:42:26 +02:00
Panos Vagenas b957d966d8 fix(markdown): suppress FieldRegionItem and FieldItem serialization (#724)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-08-19 15:54:02 +02:00
github-actions[bot] bfbeb795e8 chore: bump version to 2.92.0 [skip ci] v2.92.0 2026-08-19 10:54:25 +00:00
Cesar Berrospi Ramis 289c2e50fb fix(markdown): serialize newlines as GFM hard line breaks (#721)
* fix(markdown): serialize newlines as GFM hard line breaks

Single \n in body text and list items is now serialized as '  \n'
(two trailing spaces), which GFM renders as a hard line break.
Double \n\n is preserved as a paragraph break.
Newlines in headings are collapsed to a space, since headings cannot
span multiple lines.
PlainTextDocSerializer is unaffected via overridable instance methods.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(deps): upgrade uv.lock dependencies

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-08-19 11:03:45 +02:00
Jordan WhiteandCesar Berrospi Ramis ec0069c6ec perf: contextualize function() skip excluded fields (#581)
* contextualize function() skip excluded fields

This change proposes that we use model_dump to skip/avoid serializing
fields that are in excluded_embed. This should reduce unnecesary
computation and is also more precisely what I believe we are intending
to do here in that we do not need to unnecessarily filter the results
below in the for-loop.

Signed-off-by: Jordan White <jordan.page.white@gmail.com>

* style(chunker): fix style issue C416

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(chunker): resolve excluded_embed to field names

model_dump(exclude=...) requires Python attribute names, not
aliases. excluded_embed stores alias keys, which happen to
match today but would silently fail to exclude fields in
subclasses where they differ, leaking excluded fields into the
embedding context.

Adds BaseMeta._excluded_embed_field_names() to resolve each
entry through the alias-to-field-name map. contextualize() now
calls this helper instead of using excluded_embed directly.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(chunker): fix pydantic deprecation

Deprecated in pydantic v2.11, removed in v3: model_fields can only be accessed
from class object, not the instance.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(chunker): add test to verify contextualize() excludes the right fields

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore: update uv.lock dependencies

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Jordan White <jordan.page.white@gmail.com>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-08-19 10:00:09 +02:00
Cesar Berrospi Ramis f756342105 feat(compat): DoclingDocument downgrade projector system (#703)
* feat(compat): add DoclingDocument version-downgrade projector system

Adds docling_core/compat.py with a register_projector decorator,
project_to() API, and five retroactive projectors (1.10→1.9→1.8→1.7→
1.6→1.5). Adds scripts/check_compat_projectors.py as a pre-commit hook
that detects unannounced structural breaking changes and enforces that
every schema minor bump ships a projector, a JSON Schema snapshot, and a
test class. 36 new tests in test/test_compat.py; CONTRIBUTING.md
documents the change-classification table and 7-step checklist.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore: upgrade uv.lock dependencies

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-08-18 10:29:48 +02:00
Matvei SmirnovandCesar Berrospi Ramis 965a6bb6a8 fix(chunker): forward content layers from serializer params to doc traversal (#593)
fix(chunker): included content layers

Signed-off-by: Vdaleke <vdalekesmirnov@gmail.com>
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
Co-authored-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-08-17 10:53:11 +02:00
Omar Faig Orujlu 4252788e6a fix(serializer): use block-level spacing for page breaks inside lists (#717)
A page break falling inside a ListGroup was emitted as an ordinary list
part and joined with the list separator "\n", while one falling between
top-level items was joined with "\n\n". The placeholder is substituted
into the already joined text, so the spacing was fixed by whichever
scope emitted the break and could not be renegotiated downstream.

Exporting a document globally and page by page therefore disagreed by
two bytes whenever a list straddled a page boundary, although the
content matched.

MarkdownListSerializer now separates a page break part from its
neighbours with "\n\n", so the marker forms a block in either scope. To
let it recognise such a part, DocSerializer.serialize() returns the
_PageBreakSerResult as such instead of rebuilding a plain result and
dropping the type.

Output is unchanged for callers leaving page_break_placeholder unset,
as no page break parts are produced at all in that case.

Signed-off-by: OmarFaig <omerfaiq7@gmail.com>
2026-08-14 16:07:01 +02:00
github-actions[bot] 2cae21e3f8 chore: bump version to 2.91.0 [skip ci] v2.91.0 2026-08-06 14:21:51 +00:00
Peter W. J. Staar f39885b8c5 feat: update the add_<...> items with source uniformly (#711)
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-08-06 16:01:38 +02:00
github-actions[bot] 23fa247e9a chore: bump version to 2.90.0 [skip ci] v2.90.0 2026-08-03 12:21:10 +00:00
Peter W. J. Staar d93e83f7f1 feat: accept EBCDIC MIME types in DocumentOrigin (#707)
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-08-03 11:15:35 +02:00
Christoph Auer d808ea3c85 chore: Update install instructions for dclq (#704)
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2026-07-31 14:54:20 +02:00
github-actions[bot] 5fa6cae721 chore: bump version to 2.89.0 [skip ci] v2.89.0 2026-07-31 12:06:39 +00:00
Christoph Auer cf2ac70632 feat: dclq tool (#696)
* feat: add initial dlgrep implementation

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* refactor: migrate CLI to Typer

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* docs: expand README

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* docs: improve README examples

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fix: streamline dlgrep output

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fix: make text context output grep-compatible

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Improve XPath and inline context output

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* dlgrep support extensions

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Use git sources for doclang and docling-core

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* feat: emit native JSON records

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Remove search class filter

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Make section output addressable

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Improve README examples

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* feat: build and publish dlgrep from this repository

dlgrep becomes a uv workspace member under packages/dlgrep, published as
its own wheel and released in lockstep with docling-core: same version,
exact `docling-core==` pin, both wheels built from the same commit. This
removes the git-branch dependency dlgrep needed to track unreleased
docling-core changes.

- workspace wiring; ruff, mypy and pytest config inherited from the root,
  dlgrep in the dev group so `uv sync` covers it
- release.sh writes both versions and the pin from one TARGET_VERSION
- build-packages.sh builds into per-package dist dirs; pypi.yml publishes
  docling-core first, then dlgrep
- check_lockstep.py guards against version drift, which uv cannot catch on
  its own: the workspace source replaces the pin with a local path, so a
  wrong pin resolves and locks cleanly
- checks.yml and pypi.yml install both wheels together, which makes a
  mismatched pin fail before anything is published
- declare click and lxml, previously only transitive
- read __version__ from package metadata instead of a hardcoded literal
- flag dlgrep as experimental in its help output, since the shared version
  number would otherwise imply a maturity it does not have

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* ci: simplify lockstep release tooling

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* chore(dlgrep): drop handoff notes, keep only the CLI plan

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* refactor(doclang): isolate source mapping recorder

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* build(dlgrep): move dependencies to core extra

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* feat(dlq): rename CLI and add list command

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* feat(dclq): rename tool and consolidate plan

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fix(dclq): bound archive document reads

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

---------

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2026-07-31 13:38:43 +02:00
Daniel KapitanandCopilot 6b8d35ff28 fix: relax typer upper bound to <0.27.0 (#697)
* Relax typer upper bound to <0.27.0

Match docling's own typer constraint (>=0.12.5,<0.27.0). The
<0.25.0 pin appears overly conservative: docling_core/cli/serialize.py
and view.py only use stable Typer/Click APIs (Typer, Exit, Argument,
Option, BadParameter, echo, typer.main.get_command), verified working
under typer 0.26.8.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* DCO Remediation Commit for Daniel Kapitan <daniel@kapitan.net>

I, Daniel Kapitan <daniel@kapitan.net>, hereby add my Signed-off-by to this commit: fcc22ce120

Signed-off-by: Daniel Kapitan <daniel@kapitan.net>

* chore: update uv.lock for relaxed typer upper bound

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* DCO Remediation Commit for Daniel Kapitan <daniel@kapitan.net>

I, Daniel Kapitan <daniel@kapitan.net>, hereby add my Signed-off-by to this commit: fcc22ce120
I, Daniel Kapitan <daniel@kapitan.net>, hereby add my Signed-off-by to this commit: cfd2fc94b1

Signed-off-by: Daniel Kapitan <daniel@kapitan.net>

---------

Signed-off-by: Daniel Kapitan <daniel@kapitan.net>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-28 14:26:05 +02:00
Christoph Auer 4afc5e6789 fix: preserve literal tag-shaped text in OTSL cells (#695)
Fix OTSL delimited content interpreted as XML elements

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2026-07-27 16:45:29 +02:00
github-actions[bot] c357d5c6c4 chore: bump version to 2.88.0 [skip ci] v2.88.0 2026-07-27 11:53:54 +00:00
Max Hsu b869c67cf8 fix(doclang): clamp deep section headers instead of raising (#688)
DocLangDocSerializer raised "level must be in [1, 6]" for any
SectionHeaderItem with level 6. That is reachable in normal use, not a
synthetic edge case: SectionHeaderItem.level accepts up to 100, and
docling's heading-hierarchy inference emits level-6 headings by default,
so a PDF with nested procedure lists crashes the serializer.

The +1 shift (level 1 is reserved for TitleItem) pushed level 6 to 7,
past the heading token's allowed range, with nothing clamping it back.
html.py already clamps the identical item.level + 1 computation with
min(..., 6); this applies the same treatment, which is the smallest fix
and keeps the two serializers consistent.

Fixes #685

Signed-off-by: Max Hsu <maxmilian@gmail.com>
2026-07-27 13:48:31 +02:00
Akhil Trivedi 26a50ab140 fix(doclang): sanitize XML-illegal text characters (#687)
Signed-off-by: AkhilTrivediX <118957648+AkhilTrivediX@users.noreply.github.com>
2026-07-27 13:48:15 +02:00
Peter W. J. Staar 129811fe49 fix: DocLang deserialization of XML-sensitive OTSL cell content (#689)
fix: doclang deserialization

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-07-24 16:23:43 +02:00
Hamza Badreddine b7a4298b4f fix: accept application/epub+zip mimetype in DocumentOrigin (#692)
Signed-off-by: manticore999 <hamzabadreddine852@gmail.com>
2026-07-24 07:35:33 +02:00