Skip to content

Add integration test for AnnotateImage transform#11000

Merged
kamilwu merged 2 commits intoapache:masterfrom
kamilwu:cloudvision-it-test
Mar 3, 2020
Merged

Add integration test for AnnotateImage transform#11000
kamilwu merged 2 commits intoapache:masterfrom
kamilwu:cloudvision-it-test

Conversation

@kamilwu
Copy link
Contributor

@kamilwu kamilwu commented Feb 28, 2020


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@kamilwu
Copy link
Contributor Author

kamilwu commented Feb 28, 2020

Run Python 2 PostCommit

@kamilwu
Copy link
Contributor Author

kamilwu commented Feb 28, 2020

Run Python PreCommit

@kamilwu
Copy link
Contributor Author

kamilwu commented Feb 28, 2020

R: @EDjur

Comment on lines 31 to 44
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):
Copy link
Contributor

@EDjur EDjur Feb 28, 2020

Choose a reason for hiding this comment

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

LGTM.

One small question though: Should we guard against environments where vision isn't installed by having the unittest.skipIf...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Yeah fair either way then. LGTM :)

@EDjur
Copy link
Contributor

EDjur commented Feb 28, 2020

And seems we need an infra admin to enable the Vision API in the build project.

@kamilwu
Copy link
Contributor Author

kamilwu commented Feb 28, 2020

Thanks @EDjur. I've already asked for enabling the Vision API, let's just wait until this happens.

@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 2, 2020

Run Python 2 PostCommit

1 similar comment
@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 2, 2020

Run Python 2 PostCommit

@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 3, 2020

Retest this please

@kamilwu kamilwu force-pushed the cloudvision-it-test branch from f31ee96 to c2b7212 Compare March 3, 2020 13:05
@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 3, 2020

Run Python 3.7 PostCommit

@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 3, 2020

Retest this please

@kamilwu
Copy link
Contributor Author

kamilwu commented Mar 3, 2020

Run Python PreCommit

@kamilwu kamilwu merged commit 53be3ff into apache:master Mar 3, 2020
@kamilwu kamilwu deleted the cloudvision-it-test branch March 3, 2020 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants