Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
align_headersinunstructured_inference/models/tables.py:487fills in the rows above a column header withrange(header_row_nums[0] + 1), so the first header row appears twice. The loop that follows stops at the repeat. Every header row after the first one then comes out as a body row. Incells_to_htmlthat row turns into<td>cells in<tbody>, sotext_as_htmlloses the second header row.A header box over rows 1 and 2 of a four-row table:
With
range(header_row_nums[0]):The docstring asks for the convex hull of the rows the header intersects. The code extends that up to row 0, so rows 0 to 2 here. A header that starts on row 0, or covers a single row, gives the same result before and after. The line came from microsoft/table-transformer's
postprocess.py, and that repository is archived, so this copy is the only place to fix it. No issue exists for this.Verification
Baseline on
158db67is57 passed, so the delta is the 3 new cases. I restoredtables.pyfrom158db67and kept the tests, which gives1 failed, 59 passed. The failing case is the header over rows 1 and 2.ruff checkandruff format --check(0.15.10) are clean on both files, andmake check-versionpasses.The CHANGELOG entry takes 1.6.15, which my #525 also claims. I'll rebase whichever one merges second. @badGarnet, could you review this when you next look at table post-processing?