Skip to content

fixit: Changes to DocAI Samples to simplify maintenence#9743

Merged
gcf-merge-on-green[bot] merged 7 commits into
mainfrom
docai-processor-versions
Jun 21, 2023
Merged

fixit: Changes to DocAI Samples to simplify maintenence#9743
gcf-merge-on-green[bot] merged 7 commits into
mainfrom
docai-processor-versions

Conversation

@holtskinner
Copy link
Copy Markdown
Contributor

@holtskinner holtskinner commented Apr 20, 2023

  • Consolidated process/batch process samples with processor versions
  • Update Quickstart to include Processor Creation
  • Consolidate Handle Response Samples into a single file to reduce code duplication
    • Not sure if I did the region tags completely correct, is there a way to test?
    • Update: Tested using Devsite staging and it looks correct
  • Moved Operations Tests into a single file and removed exception handling in sample
  • Add type updates from fixit fixit: Add type-hints to Python sample at documentai/snippets #9991

@holtskinner holtskinner requested review from a team as code owners April 20, 2023 19:26
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: documentai Issues related to the Document AI API. labels Apr 20, 2023
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Apr 20, 2023

Here is the summary of changes.

You are about to add 17 region tags.
You are about to delete 7 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@holtskinner holtskinner force-pushed the docai-processor-versions branch from 7dc9e4a to 9bbdcf4 Compare May 19, 2023 15:30
@holtskinner holtskinner added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:run Add this label to force Kokoro to re-run the tests. labels May 22, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 22, 2023
Copy link
Copy Markdown
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

Don't disable flake8 entirely

Comment thread documentai/snippets/quickstart_sample_test.py
@holtskinner holtskinner changed the title docs(samples): Changes to DocAI Samples to simplify maintenence fixit: Changes to DocAI Samples to simplify maintenence May 30, 2023
@holtskinner holtskinner added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 30, 2023
Comment thread documentai/snippets/batch_process_documents_sample.py Outdated
Copy link
Copy Markdown
Contributor

@yil532 yil532 left a comment

Choose a reason for hiding this comment

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

LGTM

@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 5, 2023
@holtskinner holtskinner added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 14, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 14, 2023
- Consolidated process/batch process samples with processor versions
- Update Quickstart to include Processor Creation
- Consolidate Handle Response Samples into a single file to reduce code duplication
  - ~Not sure if I did the region tags completely correct, is there a way to test?~
  - Update: Tested using Devsite staging and it looks correct
- Moved Operations Tests into a single file and removed exception handling in sample
- Add type updates from fixit #9991
@holtskinner holtskinner force-pushed the docai-processor-versions branch from 39e1808 to cde655e Compare June 15, 2023 14:58
print_lines(page.lines, text)
print_tokens(page.tokens, text)

# Currently supported in version `pretrained-ocr-v1.1-2022-09-12`
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.

Is there a way to state this concept, but not tie it to a specific version that will cause the sample to become stale quickly?

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.

Currently, this feature is only enabled in that version, but not the one that is newer (unless you send a specific parameter that is only enabled on the v1beta3 endpoint...) But supposedly this feature is going to be added to more versions later this quarter.

I could change this to say "only supported in some processor versions, refer to https://cloud.google.com/document-ai/docs/processors-list#processor_doc-ocr for more information" but I wanted to be more specific.

@holtskinner holtskinner added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 21, 2023
@holtskinner
Copy link
Copy Markdown
Contributor Author

I will also make the docs update to update the sample files.

@gcf-owl-bot gcf-owl-bot Bot requested a review from a team as a code owner June 21, 2023 15:16
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 21, 2023
@holtskinner holtskinner added the owlbot:ignore instruct owl-bot to ignore a PR label Jun 21, 2023
@holtskinner holtskinner force-pushed the docai-processor-versions branch from 6e15ef8 to 64bb497 Compare June 21, 2023 16:47
@holtskinner holtskinner added automerge Merge the pull request once unit tests and other checks pass. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 21, 2023
@gcf-merge-on-green gcf-merge-on-green Bot merged commit 39d7fdb into main Jun 21, 2023
@gcf-merge-on-green gcf-merge-on-green Bot deleted the docai-processor-versions branch June 21, 2023 16:54
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: documentai Issues related to the Document AI API. kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:ignore instruct owl-bot to ignore a PR samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants