Skip to content

Commit 8a10a97

Browse files
Vision code re-organization (googleapis#3952)
1 parent 944e8fd commit 8a10a97

51 files changed

Lines changed: 318 additions & 293 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

vision/.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[run]
22
branch = True
3+
omit =
4+
google/cloud/vision_v1/gapic/*.py
5+
google/cloud/vision_v1/proto/*.py
36

47
[report]
58
fail_under = 100

vision/google/cloud/gapic/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

vision/google/cloud/gapic/vision/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

vision/google/cloud/gapic/vision/v1/image_annotator_client_config.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

vision/google/cloud/proto/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

vision/google/cloud/proto/vision/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

vision/google/cloud/proto/vision/v1/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

vision/google/cloud/vision/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
__version__ = get_distribution('google-cloud-vision').version
3535

3636
from google.cloud.vision.client import Client
37-
from google.cloud.vision_v1 import * # noqa
37+
38+
from google.cloud.vision_v1 import enums
39+
from google.cloud.vision_v1 import ImageAnnotatorClient
40+
from google.cloud.vision_v1 import types
3841

3942

4043
__all__ = (

vision/google/cloud/vision/_gax.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
"""GAX Client for interacting with the Google Cloud Vision API."""
1616

17-
from google.cloud.gapic.vision.v1 import image_annotator_client
18-
from google.cloud.proto.vision.v1 import image_annotator_pb2
17+
from google.cloud.vision_v1.gapic import image_annotator_client
18+
from google.cloud.vision_v1.proto import image_annotator_pb2
1919

2020
from google.cloud.vision import __version__
2121
from google.cloud.vision.annotations import Annotations
@@ -43,7 +43,7 @@ def annotate(self, images=None, requests_pb=None):
4343
e.g. [(image, [feature_one, feature_two]),]
4444
4545
:type requests_pb: list
46-
:param requests_pb: List of :class:`google.cloud.proto.vision.v1.\
46+
:param requests_pb: List of :class:`google.cloud.vision_v1.proto.\
4747
image_annotator_pb2.AnnotateImageRequest`
4848
4949
:rtype: list
@@ -77,7 +77,7 @@ def _to_gapic_feature(feature):
7777
:param feature: Local ``Feature`` class to be converted to gRPC ``Feature``
7878
instance.
7979
80-
:rtype: :class:`~google.cloud.proto.vision.v1.image_annotator_pb2.Feature`
80+
:rtype: :class:`~google.cloud.vision_v1.proto.image_annotator_pb2.Feature`
8181
:returns: gRPC ``Feature`` converted from
8282
:class:`~google.cloud.vision.feature.Feature`.
8383
"""
@@ -92,7 +92,7 @@ def _to_gapic_image(image):
9292
:type image: :class:`~google.cloud.vision.image.Image`
9393
:param image: Local ``Image`` class to be converted to gRPC ``Image``.
9494
95-
:rtype: :class:`~google.cloud.proto.vision.v1.image_annotator_pb2.Image`
95+
:rtype: :class:`~google.cloud.vision_v1.proto.image_annotator_pb2.Image`
9696
:returns: gRPC ``Image`` converted from
9797
:class:`~google.cloud.vision.image.Image`.
9898
"""

vision/google/cloud/vision/_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def annotate(self, images=None, requests_pb=None):
7070
:returns: List of :class:`~googe.cloud.vision.annotations.Annotations`.
7171
7272
:type requests_pb: list
73-
:param requests_pb: List of :class:`google.cloud.proto.vision.v1.\
73+
:param requests_pb: List of :class:`google.cloud.vision_v1.proto.\
7474
image_annotator_b2.AnnotateImageRequest`.
7575
7676
:rtype: list

0 commit comments

Comments
 (0)