Skip to content

Commit

Permalink
chore(python): allow client documentation to be customized in README (#3
Browse files Browse the repository at this point in the history
)

Source-Link: googleapis/synthtool@95d9289
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93

fix(deps): require google-api-core>=1.32.0,>=2.8.0
  • Loading branch information
gcf-owl-bot[bot] authored Jul 20, 2022
1 parent c0f9891 commit 911c36d
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# 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
# 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.

docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
digest: sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93
# created: 2022-07-14T01:58:16.015625351Z
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
- name: Report coverage results
run: |
coverage combine .coverage-results/.coverage*
coverage report --show-missing --fail-under=100
coverage report --show-missing --fail-under=98
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Python Client for BeyondCorp ClientConnectorServices API
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-beyondcorp-clientconnectorservices.svg
:target: https://pypi.org/project/google-cloud-beyondcorp-clientconnectorservices/
.. _BeyondCorp ClientConnectorServices API: https://cloud.google.com/beyondcorp/
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/beyondcorp/latest
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/beyondcorpclientconnectorservices/latest
.. _Product Documentation: https://cloud.google.com/beyondcorp/

Quick Start
Expand Down Expand Up @@ -55,18 +55,22 @@ Code samples and snippets live in the `samples/` folder.

Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Our client libraries are compatible with all current [active](https://devguide.python.org/devcycle/#in-development-main-branch) and [maintenance](https://devguide.python.org/devcycle/#maintenance-branches) versions of
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
Python.

Python >= 3.7

.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python <= 3.6

If you are using an [end-of-life](https://devguide.python.org/devcycle/#end-of-life-branches)
If you are using an `end-of-life`_
version of Python, we recommend that you update as soon as possible to an actively supported version.

.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches

Mac/Linux
^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@


class ClientConnectorServicesServiceAsyncClient:
"""API Overview
------------
The ``beyondcorp.googleapis.com`` service implements the Google
"""API Overview: The ``beyondcorp.googleapis.com`` service implements the Google
Cloud BeyondCorp API.
Data Model
----------
The ClientConnectorServicesService exposes the following resources:
Data Model: The ClientConnectorServicesService exposes the following resources:
- Client Connector Services, named as follows:
``projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}``.
Expand Down Expand Up @@ -1119,9 +1113,10 @@ async def set_iam_policy(
optionally specify a ``condition``, which is a logic
expression that further constrains the role binding
based on attributes about the request and/or target
resource.
**JSON Example**
::
resource. JSON Example.
.. code-block:: python
{
"bindings": [
{
Expand All @@ -1145,8 +1140,11 @@ async def set_iam_policy(
}
]
}
**YAML Example**
::
bindings:
- members:
- user:[email protected]
Expand All @@ -1161,6 +1159,7 @@ async def set_iam_policy(
title: expirable access
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down Expand Up @@ -1233,9 +1232,10 @@ async def get_iam_policy(
optionally specify a ``condition``, which is a logic
expression that further constrains the role binding
based on attributes about the request and/or target
resource.
**JSON Example**
::
resource. JSON Example.
.. code-block:: python
{
"bindings": [
{
Expand All @@ -1259,8 +1259,11 @@ async def get_iam_policy(
}
]
}
**YAML Example**
::
bindings:
- members:
- user:[email protected]
Expand All @@ -1275,6 +1278,7 @@ async def get_iam_policy(
title: expirable access
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,10 @@ def get_transport_class(
class ClientConnectorServicesServiceClient(
metaclass=ClientConnectorServicesServiceClientMeta
):
"""API Overview
------------
The ``beyondcorp.googleapis.com`` service implements the Google
"""API Overview: The ``beyondcorp.googleapis.com`` service implements the Google
Cloud BeyondCorp API.
Data Model
----------
The ClientConnectorServicesService exposes the following resources:
Data Model: The ClientConnectorServicesService exposes the following resources:
- Client Connector Services, named as follows:
``projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}``.
Expand Down Expand Up @@ -1384,9 +1378,10 @@ def set_iam_policy(
optionally specify a ``condition``, which is a logic
expression that further constrains the role binding
based on attributes about the request and/or target
resource.
**JSON Example**
::
resource. JSON Example.
.. code-block:: python
{
"bindings": [
{
Expand All @@ -1410,8 +1405,11 @@ def set_iam_policy(
}
]
}
**YAML Example**
::
bindings:
- members:
- user:[email protected]
Expand All @@ -1426,6 +1424,7 @@ def set_iam_policy(
title: expirable access
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down Expand Up @@ -1498,9 +1497,10 @@ def get_iam_policy(
optionally specify a ``condition``, which is a logic
expression that further constrains the role binding
based on attributes about the request and/or target
resource.
**JSON Example**
::
resource. JSON Example.
.. code-block:: python
{
"bindings": [
{
Expand All @@ -1524,8 +1524,11 @@ def get_iam_policy(
}
]
}
**YAML Example**
::
bindings:
- members:
- user:[email protected]
Expand All @@ -1540,6 +1543,7 @@ def get_iam_policy(
title: expirable access
description: Does not grant access after Sep 2020
expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
For a description of IAM and its features, see the `IAM
developer's
guide <https://cloud.google.com/iam/docs>`__.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,10 @@ class ClientConnectorServicesServiceGrpcTransport(
):
"""gRPC backend transport for ClientConnectorServicesService.
API Overview
------------
The ``beyondcorp.googleapis.com`` service implements the Google
API Overview: The ``beyondcorp.googleapis.com`` service implements the Google
Cloud BeyondCorp API.
Data Model
----------
The ClientConnectorServicesService exposes the following resources:
Data Model: The ClientConnectorServicesService exposes the following resources:
- Client Connector Services, named as follows:
``projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,10 @@ class ClientConnectorServicesServiceGrpcAsyncIOTransport(
):
"""gRPC AsyncIO backend transport for ClientConnectorServicesService.
API Overview
------------
The ``beyondcorp.googleapis.com`` service implements the Google
API Overview: The ``beyondcorp.googleapis.com`` service implements the Google
Cloud BeyondCorp API.
Data Model
----------
The ClientConnectorServicesService exposes the following resources:
Data Model: The ClientConnectorServicesService exposes the following resources:
- Client Connector Services, named as follows:
``projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def cover(session):
test runs (not system test runs), and then erases coverage data.
"""
session.install("coverage", "pytest-cov")
session.run("coverage", "report", "--show-missing", "--fail-under=100")
session.run("coverage", "report", "--show-missing", "--fail-under=98")

session.run("coverage", "erase")

Expand Down
29 changes: 29 additions & 0 deletions packages/google-cloud-beyondcorp-clientconnectorservices/owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,34 @@
default_version = "v1"

for library in s.get_staging_dirs(default_version):
# work around issues with docstrings
s.replace(
library / "google/cloud/**/*.py",
"""resource.
\*\*JSON Example\*\*
::""",
"""resource. JSON Example.
.. code-block:: python\n""",
)

s.replace(
library / "google/cloud/**/*.py",
"""\*\*YAML Example\*\*
::""",
"""\n **YAML Example**
::\n""",
)

s.replace(library / "google/cloud/**/*.py",
""" For a description of IAM and its features, see the `IAM
developer's""",
"""\n For a description of IAM and its features, see the `IAM
developer's"""
)
s.replace(library / "google/cloud/**/*.py","\n ------------\n\n ",":")
s.replace(library / "google/cloud/**/*.py","\n ----------\n\n ",":")
s.move(library, excludes=["google/cloud/beyondcorp_clientconnectorservices", "setup.py"])
s.remove_staging_dirs()

Expand All @@ -33,6 +61,7 @@
# ----------------------------------------------------------------------------

templated_files = gcp.CommonTemplates().py_library(
cov_level=98,
microgenerator=True,
versions=gcp.common.detect_versions(path="./google", default_first=True),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version = "0.1.0"
release_status = "Development Status :: 4 - Beta"
dependencies = [
"google-api-core[grpc] >= 2.8.0, <3.0.0dev",
"google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*",
"proto-plus >= 1.15.0, <2.0.0dev",
"protobuf >= 3.19.0, <4.0.0dev",
"grpc-google-iam-v1 >=0.12.4, <1.0.0dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Pin the version to the lower bound.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
# Then this file should have google-cloud-foo==1.14.0
google-api-core==2.8.0
google-api-core==1.32.0
proto-plus==1.15.0
protobuf==3.19.0
grpc-google-iam-v1==0.12.4

0 comments on commit 911c36d

Please sign in to comment.