Skip to content

Commit

Permalink
docs(cloudbuild): edit docstrings; add py2 deprecation warning; add 3…
Browse files Browse the repository at this point in the history
….8 tests (via synth) (#10092)
  • Loading branch information
yoshi-automation authored Jan 29, 2020
1 parent f478b36 commit ccbec02
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cloudbuild/docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
div#python2-eol {
border-color: red;
border-width: medium;
}
}
1 change: 1 addition & 0 deletions cloudbuild/docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

{% extends "!layout.html" %}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
Expand Down
11 changes: 11 additions & 0 deletions cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@


from __future__ import absolute_import
import sys
import warnings

from google.cloud.devtools.cloudbuild_v1 import types
from google.cloud.devtools.cloudbuild_v1.gapic import cloud_build_client
from google.cloud.devtools.cloudbuild_v1.gapic import enums


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class CloudBuildClient(cloud_build_client.CloudBuildClient):
__doc__ = cloud_build_client.CloudBuildClient.__doc__
enums = enums
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ class Status(enum.IntEnum):
STATUS_UNSPECIFIED (int): Status of the ``WorkerPool`` is unknown.
CREATING (int): ``WorkerPool`` is being created.
RUNNING (int): ``WorkerPool`` is running.
DELETING (int): ``WorkerPool`` is being deleting: cancelling builds and draining
workers.
DELETING (int): ``WorkerPool`` is being deleted: cancelling builds and draining workers.
DELETED (int): ``WorkerPool`` is deleted.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ message WorkerPool {
// `WorkerPool` is running.
RUNNING = 2;

// `WorkerPool` is being deleting: cancelling builds and draining workers.
// `WorkerPool` is being deleted: cancelling builds and draining workers.
DELETING = 3;

// `WorkerPool` is deleted.
Expand Down
4 changes: 2 additions & 2 deletions cloudbuild/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def lint(session):
session.run("flake8", "google", "tests")


@nox.session(python="3.7")
@nox.session(python="3.6")
def blacken(session):
"""Run black.
Expand Down Expand Up @@ -86,7 +86,7 @@ def default(session):
)


@nox.session(python=["2.7", "3.5", "3.6", "3.7"])
@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
def unit(session):
"""Run the unit test suite."""
default(session)
Expand Down
17 changes: 12 additions & 5 deletions cloudbuild/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{
"updateTime": "2019-11-07T22:07:36.473613Z",
"updateTime": "2020-01-10T13:14:53.210754Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.41.0",
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
"version": "0.43.0",
"dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0ed34e9fdf601dfc37eb24c40e17495b86771ff4",
"internalRef": "279147036"
"sha": "360a8792ed62f944109d7e22d613a04a010665b4",
"internalRef": "289011995"
}
},
{
"template": {
"name": "python_library",
"origin": "synthtool.gcp",
"version": "2019.10.17"
}
}
],
Expand Down

0 comments on commit ccbec02

Please sign in to comment.