[ 
https://issues.apache.org/jira/browse/BEAM-9247?focusedWorklogId=393423&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-393423
 ]

ASF GitHub Bot logged work on BEAM-9247:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Feb/20 13:16
            Start Date: 26/Feb/20 13:16
    Worklog Time Spent: 10m 
      Work Description: kamilwu commented on pull request #10959: [BEAM-9247] 
Integrate GCP Vision API functionality
URL: https://github.com/apache/beam/pull/10959#discussion_r384484177
 
 

 ##########
 File path: sdks/python/apache_beam/ml/gcp/visionml_test.py
 ##########
 @@ -0,0 +1,252 @@
+# pylint: skip-file
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Unit tests for visionml."""
+
+# pytype: skip-file
+
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
+import logging
+import unittest
+
+import mock
+
+import apache_beam as beam
+from apache_beam.metrics import MetricsFilter
+from apache_beam.typehints.decorators import TypeCheckError
+
+# Protect against environments where vision lib is not available.
+try:
+  from google.cloud.vision import ImageAnnotatorClient
+  from google.cloud import vision
+  from apache_beam.ml.gcp import visionml
+except ImportError:
+  ImageAnnotatorClient = None
+
+
[email protected](
+    ImageAnnotatorClient is None, 'Vision dependencies are not installed')
+class VisionTest(unittest.TestCase):
+  def setUp(self):
+    self._mock_client = mock.Mock()
+    self.m2 = mock.Mock()
 
 Review comment:
   This mock seems to be unused
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 393423)
    Time Spent: 4h 40m  (was: 4.5h)

> [Python] PTransform that integrates Cloud Vision functionality
> --------------------------------------------------------------
>
>                 Key: BEAM-9247
>                 URL: https://issues.apache.org/jira/browse/BEAM-9247
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-py-gcp
>            Reporter: Kamil Wasilewski
>            Assignee: Elias Djurfeldt
>            Priority: Major
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> The goal is to create a PTransform that integrates Google Cloud Vision API 
> functionality [1].
> [1] https://cloud.google.com/vision/docs/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to