Add integration test for AnnotateImage transform#11000
Add integration test for AnnotateImage transform#11000kamilwu merged 2 commits intoapache:masterfrom
Conversation
|
Run Python 2 PostCommit |
|
Run Python PreCommit |
|
R: @EDjur |
| try: | ||
| from google.cloud.vision import types | ||
| except ImportError: | ||
| types = None | ||
|
|
||
|
|
||
| def extract(response): | ||
| for r in response.responses: | ||
| for text_annotation in r.text_annotations: | ||
| yield text_annotation.description | ||
|
|
||
|
|
||
| @attr('IT') | ||
| class VisionMlTestIT(unittest.TestCase): |
There was a problem hiding this comment.
LGTM.
One small question though: Should we guard against environments where vision isn't installed by having the unittest.skipIf...?
There was a problem hiding this comment.
Fair enough.
The test will always be skipped if TestPipeline(is_integration_test=True) is present and --test-pipeline-options is not provided (it's only provided in gcp environments). But maybe more explicit guard could be useful.
There was a problem hiding this comment.
I see. Yeah fair either way then. LGTM :)
|
And seems we need an infra admin to enable the Vision API in the build project. |
|
Thanks @EDjur. I've already asked for enabling the Vision API, let's just wait until this happens. |
|
Run Python 2 PostCommit |
1 similar comment
|
Run Python 2 PostCommit |
|
Retest this please |
f31ee96 to
c2b7212
Compare
|
Run Python 3.7 PostCommit |
|
Retest this please |
|
Run Python PreCommit |
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.