Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: added helper functions to DocumentWrapper - #12

Merged
galdawave merged 35 commits into
mainfrom
add-helpers
Oct 19, 2022
Merged

feat: added helper functions to DocumentWrapper#12
galdawave merged 35 commits into
mainfrom
add-helpers

Conversation

@galdawave

@galdawave galdawave commented Oct 12, 2022

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

BEGIN_COMMIT_OVERRIDE
chore: added helper functions to DocumentWrapper
END_COMMIT_OVERRIDE

@galdawave
galdawave requested a review from a team October 12, 2022 18:36
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Oct 12, 2022
@galdawave
galdawave requested a review from dizcology October 12, 2022 18:36
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
@galdawave galdawave mentioned this pull request Oct 12, 2022
4 tasks
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
@galdawave
galdawave requested a review from dizcology October 13, 2022 22:37
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
Comment thread google/cloud/documentai_toolbox/wrappers/document_wrapper.py Outdated
@galdawave
galdawave requested a review from dizcology October 18, 2022 19:40
Comment thread google/cloud/documentai_toolbox/wrappers/document.py Outdated
target_string is not None and pattern is not None
):
raise ValueError(
"Exactly one of target_string and pattern must be specified."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe "or" instead of "and".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is checking if both target_string and pattern are populated so it needs an "and" to make sure both are not none.

Comment thread google/cloud/documentai_toolbox/wrappers/document.py
Comment thread tests/unit/test_document.py Outdated
@galdawave
galdawave merged commit d103c08 into main Oct 19, 2022
@galdawave
galdawave deleted the add-helpers branch October 19, 2022 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants