-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ContentLayer attribute to designate items to body or furniture #148
Conversation
Signed-off-by: Christoph Auer <[email protected]>
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Require two reviewer for test updatesWonderful, this rule succeeded.When test data is updated, we require two reviewers
|
Signed-off-by: Panos Vagenas <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
…ter in body Signed-off-by: Christoph Auer <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
Signed-off-by: Christoph Auer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
# Since version 1.1.0, all NodeItems carry content_layer property. | ||
# We must assign previous page_header and page_footer instances to furniture. | ||
# Note: model_validators which check on the version must use "before". | ||
if "version" in data and data["version"] == "1.0.0": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have already logic in docling-core about checking version numbers: https://github.com/DS4SD/docling-core/blob/main/docling_core/types/doc/document.py#L2947
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but why do we need that logic? This is not about determining if the version is compatible, it is specifically checking if the version is 1.0.0 (the only version in existence prior to the current version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have to add PAGE_HEADER
and PAGE_FOOTER
to DEFAULT_EXPORT_LABELS
Signed-off-by: Christoph Auer <[email protected]>
@dolfim-ibm Problem with putting PAGE_HEADER and PAGE_FOOTER in the default labels:
|
…ure (#148) * feat: Add ContentLayer attribute to designate items to body or furniture Signed-off-by: Christoph Auer <[email protected]> * introduce safer data gen mechanism, update chunking test data Signed-off-by: Panos Vagenas <[email protected]> * Do not make test rely on order in yaml Signed-off-by: Christoph Auer <[email protected]> * chore: format fixes Signed-off-by: Christoph Auer <[email protected]> * fix: legacy_to_docling_doc must use content_layer Signed-off-by: Christoph Auer <[email protected]> * Add content_layer in iterate_items Signed-off-by: Christoph Auer <[email protected]> * Bump format version, add model_validator for old page_header,page_footer in body Signed-off-by: Christoph Auer <[email protected]> * fix: Change to before model_validator Signed-off-by: Christoph Auer <[email protected]> * Update tests Signed-off-by: Christoph Auer <[email protected]> * Address review comments Signed-off-by: Christoph Auer <[email protected]> --------- Signed-off-by: Christoph Auer <[email protected]> Signed-off-by: Panos Vagenas <[email protected]> Co-authored-by: Panos Vagenas <[email protected]>
No description provided.