-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Import Document from Batch Process Metadata & Operation (#88)
* feat: Add utility functions for GCS URIs - Updates to types to fix lint errors - Add `files_to_display` optional parameter to `print_document_tree()` - Other formatting improvements for docs. * test: Add tests for gcs_uri functions. * feat: Add Import Document from batch process metadata * refactor: Moved `_get_storage_client` and `get_bytes` to utilities - Resolves Circular dependency * test: Attempt to fix mock patch * test: Attempt to fix test import errors * Change utility import in converter_helpers.py * Update utilities import * Added Inline samples for `from_document_path()` and `from_documentai_document()` * feat: Add utility functions for GCS URIs - Updates to types to fix lint errors - Add `files_to_display` optional parameter to `print_document_tree()` - Other formatting improvements for docs. * test: Add tests for gcs_uri functions. * feat: Add Import Document from batch process metadata * refactor: Moved `_get_storage_client` and `get_bytes` to utilities - Resolves Circular dependency * test: Attempt to fix mock patch * test: Attempt to fix test import errors * Change utility import in converter_helpers.py * Update utilities import * Added Inline samples for `from_document_path()` and `from_documentai_document()` * test: Add check for Failed BatchProcessMetadata * fix: Update imports based on Gal's feedback * refactor: Rename `utilities.py` to `gcs_utilities.py` * Add alias for gcs_utilities in `__init__.py` * Update mock.patch for gcs_utilities in `test_converter.py` * Removed alias for gcs_utilities. Changed Samples to follow * Added `Document.from_batch_process_operation()` - Gets operation information and passes it to `from_batch_process_metadata()` * Fixed mock.patch for `get_bytes_images_mock` * Remove underscore from `get_bytes` in `get_bytes_images_mock`
- Loading branch information
1 parent
383e105
commit f95bbea
Showing
12 changed files
with
500 additions
and
166 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Document AI Toolbox Utilities | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. automodule:: google.cloud.documentai_toolbox.utilities.utilities | ||
.. automodule:: google.cloud.documentai_toolbox.utilities.gcs_utilities | ||
:members: | ||
:private-members: | ||
:noindex: |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.