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

feat: support single metadata dictionary in PyPDFToDocument #6615

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

ZanSara
Copy link
Contributor

@ZanSara ZanSara commented Dec 21, 2023

Related Issues

Proposed Changes:

Adds support for single metadata dictionary input in PyPDFToDocument. In this way, additional metadata can be added to all files processed by this component even when the length of the list of sources is unknown.

How did you test it?

Added tests and run locally.

Notes for the reviewer

See the linked issue and this discussion for context.

Checklist

@github-actions github-actions bot added topic:tests 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Dec 21, 2023
@ZanSara ZanSara marked this pull request as ready for review December 21, 2023 15:09
@ZanSara ZanSara requested review from a team as code owners December 21, 2023 15:09
@ZanSara ZanSara requested review from dfokina and julian-risch and removed request for a team December 21, 2023 15:09
Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

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

Looks quite good to me already. Two change requests: Could you please update the usage example here to use meta data. And could you please make sure that we test both meta input formats in the tests: single dict and list of multiple dicts and one run without any meta data? Right now, the names of the tests can also be improved. We have "test_run" and "test_run_with_meta" but both use meta.

@ZanSara ZanSara self-assigned this Dec 22, 2023
Copy link
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@ZanSara ZanSara merged commit c0f1dab into main Dec 22, 2023
21 checks passed
@ZanSara ZanSara deleted the single-meta-in-pypdf2document branch December 22, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants