Skip to content
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

fix missing source #396

Merged
merged 3 commits into from
Oct 18, 2024
Merged

fix missing source #396

merged 3 commits into from
Oct 18, 2024

Conversation

badGarnet
Copy link
Collaborator

@badGarnet badGarnet commented Oct 18, 2024

This PR fixes a bug that was found when working with unstructured: https://github.com/Unstructured-IO/unstructured/actions/runs/11403980075/job/31732726752#step:6:1778

test

  • this PR should fix the failing test above in unstructured ci
  • this PR expands the test on clean_layoutelements to test source is kept

note for release

Since we have not tagged a release for 0.7.42 this PR opt to not increase version number and include itself as part of 0.7.42

@@ -88,7 +90,7 @@ def concatenate(cls, groups: Iterable[LayoutElements]) -> LayoutElements:
element_probs=np.concatenate(probs),
element_class_ids=np.concatenate(class_ids),
element_class_id_map=class_id_map,
source=group.source,
source=sources[0],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will raise an error if sources is an empty list (which means that group.source is not set for any group in groups)

Copy link
Contributor

@christinestraub christinestraub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@badGarnet badGarnet merged commit 7f82e52 into main Oct 18, 2024
5 checks passed
@badGarnet badGarnet deleted the fix/fix-source branch October 18, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants