From eecb6fdd650ec282ad49b1e983e7cedfaeecf978 Mon Sep 17 00:00:00 2001 From: Panos Vagenas <35837085+vagenas@users.noreply.github.com> Date: Tue, 4 Feb 2025 09:59:32 +0100 Subject: [PATCH] fix test data restoring alphabetical order Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> --- docs/DoclingDocument.json | 46 ++++++++++++++++++- .../docling_document/unit/FloatingItem.yaml | 2 +- .../docling_document/unit/KeyValueItem.yaml | 2 +- test/data/docling_document/unit/ListItem.yaml | 2 +- .../docling_document/unit/PictureItem.yaml | 2 +- .../unit/SectionHeaderItem.yaml | 2 +- .../data/docling_document/unit/TableItem.yaml | 2 +- test/data/docling_document/unit/TextItem.yaml | 2 +- 8 files changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/DoclingDocument.json b/docs/DoclingDocument.json index 1515b730..24defc2f 100644 --- a/docs/DoclingDocument.json +++ b/docs/DoclingDocument.json @@ -190,6 +190,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "const": "code", "default": "code", @@ -289,6 +293,15 @@ "title": "CodeLanguageLabel", "type": "string" }, + "ContentLayer": { + "description": "ContentLayer.", + "enum": [ + "body", + "furniture" + ], + "title": "ContentLayer", + "type": "string" + }, "CoordOrigin": { "description": "CoordOrigin.", "enum": [ @@ -366,6 +379,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "name": { "default": "group", "title": "Name", @@ -465,6 +482,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "const": "key_value_region", "default": "key_value_region", @@ -514,6 +535,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "const": "list_item", "default": "list_item", @@ -722,6 +747,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "const": "picture", "default": "picture", @@ -1119,6 +1148,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "const": "section_header", "default": "section_header", @@ -1297,6 +1330,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "default": "table", "enum": [ @@ -1388,6 +1425,10 @@ "title": "Children", "type": "array" }, + "content_layer": { + "$ref": "#/$defs/ContentLayer", + "default": "body" + }, "label": { "enum": [ "caption", @@ -1467,9 +1508,11 @@ "self_ref": "#/furniture", "parent": null, "children": [], + "content_layer": "body", "name": "_root_", "label": "unspecified" - } + }, + "deprecated": true }, "body": { "$ref": "#/$defs/GroupItem", @@ -1477,6 +1520,7 @@ "self_ref": "#/body", "parent": null, "children": [], + "content_layer": "body", "name": "_root_", "label": "unspecified" } diff --git a/test/data/docling_document/unit/FloatingItem.yaml b/test/data/docling_document/unit/FloatingItem.yaml index 21beef40..e0a24821 100644 --- a/test/data/docling_document/unit/FloatingItem.yaml +++ b/test/data/docling_document/unit/FloatingItem.yaml @@ -1,5 +1,6 @@ captions: [] children: [] +content_layer: body footnotes: [] image: null label: text @@ -7,4 +8,3 @@ parent: null prov: [] references: [] self_ref: '#' -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/KeyValueItem.yaml b/test/data/docling_document/unit/KeyValueItem.yaml index 1335dc90..65886e36 100644 --- a/test/data/docling_document/unit/KeyValueItem.yaml +++ b/test/data/docling_document/unit/KeyValueItem.yaml @@ -1,6 +1,6 @@ children: [] +content_layer: body label: key_value_region parent: null prov: [] self_ref: '#' -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/ListItem.yaml b/test/data/docling_document/unit/ListItem.yaml index b1bb0ca7..1a2afc1d 100644 --- a/test/data/docling_document/unit/ListItem.yaml +++ b/test/data/docling_document/unit/ListItem.yaml @@ -1,4 +1,5 @@ children: [] +content_layer: body enumerated: true label: list_item marker: (1) @@ -7,4 +8,3 @@ parent: null prov: [] self_ref: '#' text: whatever -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/PictureItem.yaml b/test/data/docling_document/unit/PictureItem.yaml index ffe342a6..34b6aa54 100644 --- a/test/data/docling_document/unit/PictureItem.yaml +++ b/test/data/docling_document/unit/PictureItem.yaml @@ -1,6 +1,7 @@ annotations: [] captions: [] children: [] +content_layer: body footnotes: [] image: null label: picture @@ -8,4 +9,3 @@ parent: null prov: [] references: [] self_ref: '#' -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/SectionHeaderItem.yaml b/test/data/docling_document/unit/SectionHeaderItem.yaml index 7d7d8998..559d12be 100644 --- a/test/data/docling_document/unit/SectionHeaderItem.yaml +++ b/test/data/docling_document/unit/SectionHeaderItem.yaml @@ -1,4 +1,5 @@ children: [] +content_layer: body label: section_header level: 2 orig: whatever @@ -6,4 +7,3 @@ parent: null prov: [] self_ref: '#' text: whatever -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/TableItem.yaml b/test/data/docling_document/unit/TableItem.yaml index 15d9a07f..61c6d327 100644 --- a/test/data/docling_document/unit/TableItem.yaml +++ b/test/data/docling_document/unit/TableItem.yaml @@ -1,5 +1,6 @@ captions: [] children: [] +content_layer: body data: grid: - - bbox: null @@ -177,4 +178,3 @@ parent: null prov: [] references: [] self_ref: '#' -content_layer: body \ No newline at end of file diff --git a/test/data/docling_document/unit/TextItem.yaml b/test/data/docling_document/unit/TextItem.yaml index 3a72b953..38c1e96f 100644 --- a/test/data/docling_document/unit/TextItem.yaml +++ b/test/data/docling_document/unit/TextItem.yaml @@ -1,8 +1,8 @@ children: [] +content_layer: body label: text orig: whatever parent: null prov: [] self_ref: '#' text: whatever -content_layer: body \ No newline at end of file