Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .librarian/generate-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "google-cloud-vision",
"version": "3.12.0",
"apis": [
{
"path": "google/cloud/vision/v1p3beta1",
"service_config": "vision_v1p3beta1.yaml"
},
{
"path": "google/cloud/vision/v1",
"service_config": "vision_v1.yaml"
},
{
"path": "google/cloud/vision/v1p1beta1",
"service_config": "vision_v1p1beta1.yaml"
},
{
"path": "google/cloud/vision/v1p2beta1",
"service_config": "vision_v1p2beta1.yaml"
},
{
"path": "google/cloud/vision/v1p4beta1",
"service_config": "vision_v1p4beta1.yaml"
}
],
Comment on lines +4 to +25
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and easier maintenance, consider sorting the API versions in the apis array. For example, v1, v1p1beta1, v1p2beta1, etc.

"source_roots": [
"packages/google-cloud-vision"
],
"preserve_regex": [
"packages/google-cloud-vision/CHANGELOG.md",
"docs/CHANGELOG.md",
"samples/README.txt",
"samples/snippets/README.rst",
"tests/system"
],
"remove_regex": [
"packages/google-cloud-vision/"
],
"tag_format": "{id}-v{version}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,9 @@ async def async_batch_annotate_images(
r"""Run asynchronous image detection and annotation for a list of
images.

Progress and results can be retrieved through the
``google.longrunning.Operations`` interface.
``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
``AsyncBatchAnnotateImagesResponse`` (results).
Progress and results can be retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata`` (metadata).
``Operation.response`` contains ``AsyncBatchAnnotateImagesResponse`` (results).

This service will write image annotation outputs to json files
in customer GCS bucket, each json file containing
Expand Down Expand Up @@ -679,9 +677,8 @@ async def async_batch_annotate_files(
r"""Run asynchronous image detection and annotation for a list of
generic files, such as PDF files, which may contain multiple
pages and multiple images per page. Progress and results can be
retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
retrieved through the ``google.longrunning.Operations`` interface. ``Operation.metadata``
contains ``OperationMetadata`` (metadata). ``Operation.response`` contains
``AsyncBatchAnnotateFilesResponse`` (results).

.. code-block:: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,11 +993,9 @@ def async_batch_annotate_images(
r"""Run asynchronous image detection and annotation for a list of
images.

Progress and results can be retrieved through the
``google.longrunning.Operations`` interface.
``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
``AsyncBatchAnnotateImagesResponse`` (results).
Progress and results can be retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata`` (metadata).
``Operation.response`` contains ``AsyncBatchAnnotateImagesResponse`` (results).

This service will write image annotation outputs to json files
in customer GCS bucket, each json file containing
Expand Down Expand Up @@ -1135,9 +1133,8 @@ def async_batch_annotate_files(
r"""Run asynchronous image detection and annotation for a list of
generic files, such as PDF files, which may contain multiple
pages and multiple images per page. Progress and results can be
retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
retrieved through the ``google.longrunning.Operations`` interface. ``Operation.metadata``
contains ``OperationMetadata`` (metadata). ``Operation.response`` contains
``AsyncBatchAnnotateFilesResponse`` (results).

.. code-block:: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ def __init__(
be used for service account credentials.
"""

scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}

# Save the scopes.
self._scopes = scopes
if not hasattr(self, "_ignore_credentials"):
Expand All @@ -102,11 +100,16 @@ def __init__(

if credentials_file is not None:
credentials, _ = google.auth.load_credentials_from_file(
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
credentials_file,
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
elif credentials is None and not self._ignore_credentials:
credentials, _ = google.auth.default(
**scopes_kwargs, quota_project_id=quota_project_id
scopes=scopes,
quota_project_id=quota_project_id,
default_scopes=self.AUTH_SCOPES,
)
# Don't apply audience if the credentials file passed from user.
if hasattr(credentials, "with_gdch_audience"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,9 @@ def async_batch_annotate_images(
Run asynchronous image detection and annotation for a list of
images.

Progress and results can be retrieved through the
``google.longrunning.Operations`` interface.
``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
``AsyncBatchAnnotateImagesResponse`` (results).
Progress and results can be retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata`` (metadata).
``Operation.response`` contains ``AsyncBatchAnnotateImagesResponse`` (results).

This service will write image annotation outputs to json files
in customer GCS bucket, each json file containing
Expand Down Expand Up @@ -461,9 +459,8 @@ def async_batch_annotate_files(
Run asynchronous image detection and annotation for a list of
generic files, such as PDF files, which may contain multiple
pages and multiple images per page. Progress and results can be
retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
retrieved through the ``google.longrunning.Operations`` interface. ``Operation.metadata``
contains ``OperationMetadata`` (metadata). ``Operation.response`` contains
``AsyncBatchAnnotateFilesResponse`` (results).

Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,9 @@ def async_batch_annotate_images(
Run asynchronous image detection and annotation for a list of
images.

Progress and results can be retrieved through the
``google.longrunning.Operations`` interface.
``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
``AsyncBatchAnnotateImagesResponse`` (results).
Progress and results can be retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata`` (metadata).
``Operation.response`` contains ``AsyncBatchAnnotateImagesResponse`` (results).

This service will write image annotation outputs to json files
in customer GCS bucket, each json file containing
Expand Down Expand Up @@ -471,9 +469,8 @@ def async_batch_annotate_files(
Run asynchronous image detection and annotation for a list of
generic files, such as PDF files, which may contain multiple
pages and multiple images per page. Progress and results can be
retrieved through the ``google.longrunning.Operations``
interface. ``Operation.metadata`` contains ``OperationMetadata``
(metadata). ``Operation.response`` contains
retrieved through the ``google.longrunning.Operations`` interface. ``Operation.metadata``
contains ``OperationMetadata`` (metadata). ``Operation.response`` contains
``AsyncBatchAnnotateFilesResponse`` (results).

Returns:
Expand Down
Loading
Loading