From 1c8973142f80254f2c09185e8568f13be750daa8 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 6 Apr 2022 12:28:18 -0600 Subject: [PATCH] fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#162) * fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#152) * chore(deps): allow google-api-core v2 on v0 release * chore: run blacken * ci: fix docs build Co-authored-by: Anthonios Partheniou * chore: set up CI on v0 branch (#153) * chore: add basic CI for v0 branch * chore: drop 3.8 from matrix Co-authored-by: Anthonios Partheniou * chore: format, udpate noxfile * chore: lower fail-under to 77 * chore: add 3.8 Co-authored-by: Anthonios Partheniou * chore(v0): release 0.4.1 (#160) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore: format Co-authored-by: Anthonios Partheniou Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .github/workflows/docs.yml | 22 +++++ .github/workflows/lint.yml | 25 +++++ .github/workflows/unittest.yml | 57 +++++++++++ .kokoro/release.sh | 4 +- .kokoro/release/common.cfg | 34 +------ docs/conf.py | 31 ++++-- grafeas/grafeas_v1/gapic/grafeas_client.py | 94 ++++++++++++------ .../transports/grafeas_grpc_transport.py | 2 +- grafeas/grafeas_v1/proto/attestation_pb2.py | 8 +- grafeas/grafeas_v1/proto/build_pb2.py | 4 +- grafeas/grafeas_v1/proto/deployment_pb2.py | 8 +- grafeas/grafeas_v1/proto/grafeas_pb2.py | 4 +- grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py | 99 +++++++++---------- grafeas/grafeas_v1/proto/package_pb2.py | 4 +- grafeas/grafeas_v1/proto/provenance_pb2.py | 20 +++- grafeas/grafeas_v1/proto/upgrade_pb2.py | 5 +- grafeas/grafeas_v1/proto/vulnerability_pb2.py | 13 ++- noxfile.py | 79 ++++++++------- setup.py | 2 +- 19 files changed, 340 insertions(+), 175 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unittest.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..fe1c768 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,22 @@ +on: + pull_request: + branches: + - v0 +name: docs +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run docs + run: | + nox -s docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9a6016c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,25 @@ +on: + pull_request: + branches: + - v0 +name: lint +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run lint + run: | + nox -s lint + - name: Run lint_setup_py + run: | + nox -s lint_setup_py diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..5a0d975 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,57 @@ +on: + pull_request: + branches: + - v0 +name: unittest +jobs: + unit: + runs-on: ubuntu-latest + strategy: + matrix: + python: ['3.6', '3.7', '3.8'] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python }} + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run unit tests + env: + COVERAGE_FILE: .coverage-${{ matrix.python }} + run: | + nox -s unit-${{ matrix.python }} + - name: Upload coverage results + uses: actions/upload-artifact@v3 + with: + name: coverage-artifacts + path: .coverage-${{ matrix.python }} + + cover: + runs-on: ubuntu-latest + needs: + - unit + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install coverage + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install coverage + - name: Download coverage results + uses: actions/download-artifact@v3 + with: + name: coverage-artifacts + path: .coverage-results/ + - name: Report coverage results + run: | + coverage combine .coverage-results/.coverage* + coverage report --show-missing --fail-under=77 diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 9b7a96d..10fb079 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools export PYTHONUNBUFFERED=1 # Move into the package, build the distribution and upload. -TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-grafeas python3 setup.py sdist bdist_wheel -twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* +twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 933870c..bbb77e3 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,42 +23,18 @@ env_vars: { value: "github/python-grafeas/.kokoro/release.sh" } -# Fetch the token needed for reporting release status to GitHub -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - # Fetch PyPI password before_action { fetch_keystore { keystore_resource { keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" + keyname: "google-cloud-pypi-token-keystore-1" } } } -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } -} - -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } +# Tokens needed to report release status back to GitHub +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } diff --git a/docs/conf.py b/docs/conf.py index 0a4008b..fc53561 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,9 +62,9 @@ master_doc = "index" # General information about the project. -project = u"grafeas" -copyright = u"2019, Google" -author = u"Google APIs" +project = "grafeas" +copyright = "2019, Google" +author = "Google APIs" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -255,7 +255,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, "grafeas.tex", u"grafeas Documentation", author, "manual",) + ( + master_doc, + "grafeas.tex", + "grafeas Documentation", + author, + "manual", + ) ] # The name of an image file (relative to this directory) to place at the top of @@ -283,7 +289,15 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "grafeas", u"grafeas Documentation", [author], 1,)] +man_pages = [ + ( + master_doc, + "grafeas", + "grafeas Documentation", + [author], + 1, + ) +] # If true, show URL addresses after external links. # man_show_urls = False @@ -298,7 +312,7 @@ ( master_doc, "grafeas", - u"grafeas Documentation", + "grafeas Documentation", author, "grafeas", "grafeas Library", @@ -323,7 +337,10 @@ intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), + "google.api_core": ( + "https://googleapis.dev/python/google-api-core/latest/", + None, + ), "grpc": ("https://grpc.io/grpc/python/", None), } diff --git a/grafeas/grafeas_v1/gapic/grafeas_client.py b/grafeas/grafeas_v1/gapic/grafeas_client.py index 5c25bdd..b454a3f 100644 --- a/grafeas/grafeas_v1/gapic/grafeas_client.py +++ b/grafeas/grafeas_v1/gapic/grafeas_client.py @@ -39,7 +39,9 @@ from grafeas.grafeas_v1.proto import grafeas_pb2_grpc -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("grafeas",).version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( + "grafeas", +).version class GrafeasClient(object): @@ -69,7 +71,9 @@ class GrafeasClient(object): def note_path(cls, project, note): """Return a fully-qualified note string.""" return google.api_core.path_template.expand( - "projects/{project}/notes/{note}", project=project, note=note, + "projects/{project}/notes/{note}", + project=project, + note=note, ) @classmethod @@ -85,7 +89,8 @@ def occurrence_path(cls, project, occurrence): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", + project=project, ) def __init__(self, transport, client_config=None, client_info=None): @@ -159,7 +164,7 @@ def get_occurrence( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -202,7 +207,9 @@ def get_occurrence( client_info=self._client_info, ) - request = grafeas_pb2.GetOccurrenceRequest(name=name,) + request = grafeas_pb2.GetOccurrenceRequest( + name=name, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -235,7 +242,7 @@ def list_occurrences( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -300,7 +307,9 @@ def list_occurrences( ) request = grafeas_pb2.ListOccurrencesRequest( - parent=parent, filter=filter_, page_size=page_size, + parent=parent, + filter=filter_, + page_size=page_size, ) if metadata is None: metadata = [] @@ -345,7 +354,7 @@ def delete_occurrence( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -385,7 +394,9 @@ def delete_occurrence( client_info=self._client_info, ) - request = grafeas_pb2.DeleteOccurrenceRequest(name=name,) + request = grafeas_pb2.DeleteOccurrenceRequest( + name=name, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -417,7 +428,7 @@ def create_occurrence( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -468,7 +479,8 @@ def create_occurrence( ) request = grafeas_pb2.CreateOccurrenceRequest( - parent=parent, occurrence=occurrence, + parent=parent, + occurrence=occurrence, ) if metadata is None: metadata = [] @@ -501,7 +513,7 @@ def batch_create_occurrences( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -552,7 +564,8 @@ def batch_create_occurrences( ) request = grafeas_pb2.BatchCreateOccurrencesRequest( - parent=parent, occurrences=occurrences, + parent=parent, + occurrences=occurrences, ) if metadata is None: metadata = [] @@ -586,7 +599,7 @@ def update_occurrence( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -641,7 +654,9 @@ def update_occurrence( ) request = grafeas_pb2.UpdateOccurrenceRequest( - name=name, occurrence=occurrence, update_mask=update_mask, + name=name, + occurrence=occurrence, + update_mask=update_mask, ) if metadata is None: metadata = [] @@ -674,7 +689,7 @@ def get_occurrence_note( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -717,7 +732,9 @@ def get_occurrence_note( client_info=self._client_info, ) - request = grafeas_pb2.GetOccurrenceNoteRequest(name=name,) + request = grafeas_pb2.GetOccurrenceNoteRequest( + name=name, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -748,7 +765,7 @@ def get_note( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -791,7 +808,9 @@ def get_note( client_info=self._client_info, ) - request = grafeas_pb2.GetNoteRequest(name=name,) + request = grafeas_pb2.GetNoteRequest( + name=name, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -824,7 +843,7 @@ def list_notes( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -889,7 +908,9 @@ def list_notes( ) request = grafeas_pb2.ListNotesRequest( - parent=parent, filter=filter_, page_size=page_size, + parent=parent, + filter=filter_, + page_size=page_size, ) if metadata is None: metadata = [] @@ -932,7 +953,7 @@ def delete_note( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -972,7 +993,9 @@ def delete_note( client_info=self._client_info, ) - request = grafeas_pb2.DeleteNoteRequest(name=name,) + request = grafeas_pb2.DeleteNoteRequest( + name=name, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -1005,7 +1028,7 @@ def create_note( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -1060,7 +1083,9 @@ def create_note( ) request = grafeas_pb2.CreateNoteRequest( - parent=parent, note_id=note_id, note=note, + parent=parent, + note_id=note_id, + note=note, ) if metadata is None: metadata = [] @@ -1093,7 +1118,7 @@ def batch_create_notes( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -1143,7 +1168,10 @@ def batch_create_notes( client_info=self._client_info, ) - request = grafeas_pb2.BatchCreateNotesRequest(parent=parent, notes=notes,) + request = grafeas_pb2.BatchCreateNotesRequest( + parent=parent, + notes=notes, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -1176,7 +1204,7 @@ def update_note( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -1231,7 +1259,9 @@ def update_note( ) request = grafeas_pb2.UpdateNoteRequest( - name=name, note=note, update_mask=update_mask, + name=name, + note=note, + update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1267,7 +1297,7 @@ def list_note_occurrences( Example: >>> from grafeas import grafeas_v1 >>> from grafeas.grafeas_v1.gapic.transports import grafeas_grpc_transport - >>> + >>> >>> address = "[SERVICE_ADDRESS]" >>> scopes = ("[SCOPE]") >>> transport = grafeas_grpc_transport.GrafeasGrpcTransport(address, scopes) @@ -1332,7 +1362,9 @@ def list_note_occurrences( ) request = grafeas_pb2.ListNoteOccurrencesRequest( - name=name, filter=filter_, page_size=page_size, + name=name, + filter=filter_, + page_size=page_size, ) if metadata is None: metadata = [] diff --git a/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py b/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py index 8a630ea..d6debbb 100644 --- a/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py +++ b/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py @@ -43,7 +43,7 @@ def __init__(self, address, scopes, channel=None, credentials=None): credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - + """ # If both `channel` and `credentials` are specified, raise an # exception (channels come with credentials baked in already). diff --git a/grafeas/grafeas_v1/proto/attestation_pb2.py b/grafeas/grafeas_v1/proto/attestation_pb2.py index 5606d9e..fdc3a67 100644 --- a/grafeas/grafeas_v1/proto/attestation_pb2.py +++ b/grafeas/grafeas_v1/proto/attestation_pb2.py @@ -24,7 +24,9 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n*grafeas/grafeas_v1/proto/attestation.proto\x12\ngrafeas.v1\x1a%grafeas/grafeas_v1/proto/common.proto"f\n\x0f\x41ttestationNote\x12.\n\x04hint\x18\x01 \x01(\x0b\x32 .grafeas.v1.AttestationNote.Hint\x1a#\n\x04Hint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t"^\n\x15\x41ttestationOccurrence\x12\x1a\n\x12serialized_payload\x18\x01 \x01(\x0c\x12)\n\nsignatures\x18\x02 \x03(\x0b\x32\x15.grafeas.v1.SignatureB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR,], + dependencies=[ + grafeas_dot_grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR, + ], ) @@ -97,7 +99,9 @@ ), ], extensions=[], - nested_types=[_ATTESTATIONNOTE_HINT,], + nested_types=[ + _ATTESTATIONNOTE_HINT, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/grafeas/grafeas_v1/proto/build_pb2.py b/grafeas/grafeas_v1/proto/build_pb2.py index a92ff93..cb08208 100644 --- a/grafeas/grafeas_v1/proto/build_pb2.py +++ b/grafeas/grafeas_v1/proto/build_pb2.py @@ -24,7 +24,9 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n$grafeas/grafeas_v1/proto/build.proto\x12\ngrafeas.v1\x1a)grafeas/grafeas_v1/proto/provenance.proto"$\n\tBuildNote\x12\x17\n\x0f\x62uilder_version\x18\x01 \x01(\t"\\\n\x0f\x42uildOccurrence\x12/\n\nprovenance\x18\x01 \x01(\x0b\x32\x1b.grafeas.v1.BuildProvenance\x12\x18\n\x10provenance_bytes\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2.DESCRIPTOR,], + dependencies=[ + grafeas_dot_grafeas__v1_dot_proto_dot_provenance__pb2.DESCRIPTOR, + ], ) diff --git a/grafeas/grafeas_v1/proto/deployment_pb2.py b/grafeas/grafeas_v1/proto/deployment_pb2.py index 342bf86..b0f11c5 100644 --- a/grafeas/grafeas_v1/proto/deployment_pb2.py +++ b/grafeas/grafeas_v1/proto/deployment_pb2.py @@ -22,7 +22,9 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n)grafeas/grafeas_v1/proto/deployment.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"&\n\x0e\x44\x65ploymentNote\x12\x14\n\x0cresource_uri\x18\x01 \x03(\t"\xc7\x02\n\x14\x44\x65ploymentOccurrence\x12\x12\n\nuser_email\x18\x01 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rundeploy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x63onfig\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\x14\n\x0cresource_uri\x18\x06 \x03(\t\x12;\n\x08platform\x18\x07 \x01(\x0e\x32).grafeas.v1.DeploymentOccurrence.Platform"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x07\n\x03GKE\x10\x01\x12\x08\n\x04\x46LEX\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], + dependencies=[ + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + ], ) @@ -259,7 +261,9 @@ ], extensions=[], nested_types=[], - enum_types=[_DEPLOYMENTOCCURRENCE_PLATFORM,], + enum_types=[ + _DEPLOYMENTOCCURRENCE_PLATFORM, + ], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/grafeas/grafeas_v1/proto/grafeas_pb2.py b/grafeas/grafeas_v1/proto/grafeas_pb2.py index 5a855a1..1624b27 100644 --- a/grafeas/grafeas_v1/proto/grafeas_pb2.py +++ b/grafeas/grafeas_v1/proto/grafeas_pb2.py @@ -1829,7 +1829,9 @@ ), ], extensions=[], - nested_types=[_BATCHCREATENOTESREQUEST_NOTESENTRY,], + nested_types=[ + _BATCHCREATENOTESREQUEST_NOTESENTRY, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py b/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py index 02d45a6..8c11732 100644 --- a/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py +++ b/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py @@ -10,26 +10,26 @@ class GrafeasStub(object): """[Grafeas](https://grafeas.io) API. - Retrieves analysis results of Cloud components such as Docker container - images. + Retrieves analysis results of Cloud components such as Docker container + images. - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GetOccurrence = channel.unary_unary( "/grafeas.v1.Grafeas/GetOccurrence", request_serializer=grafeas_dot_grafeas__v1_dot_proto_dot_grafeas__pb2.GetOccurrenceRequest.SerializeToString, @@ -105,119 +105,108 @@ def __init__(self, channel): class GrafeasServicer(object): """[Grafeas](https://grafeas.io) API. - Retrieves analysis results of Cloud components such as Docker container - images. + Retrieves analysis results of Cloud components such as Docker container + images. - Analysis results are stored as a series of occurrences. An `Occurrence` - contains information about a specific analysis instance on a resource. An - occurrence refers to a `Note`. A note contains details describing the - analysis and is generally stored in a separate project, called a `Provider`. - Multiple occurrences can refer to the same note. + Analysis results are stored as a series of occurrences. An `Occurrence` + contains information about a specific analysis instance on a resource. An + occurrence refers to a `Note`. A note contains details describing the + analysis and is generally stored in a separate project, called a `Provider`. + Multiple occurrences can refer to the same note. - For example, an SSL vulnerability could affect multiple images. In this case, - there would be one note for the vulnerability and an occurrence for each - image with the vulnerability referring to that note. - """ + For example, an SSL vulnerability could affect multiple images. In this case, + there would be one note for the vulnerability and an occurrence for each + image with the vulnerability referring to that note. + """ def GetOccurrence(self, request, context): - """Gets the specified occurrence. - """ + """Gets the specified occurrence.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListOccurrences(self, request, context): - """Lists occurrences for the specified project. - """ + """Lists occurrences for the specified project.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteOccurrence(self, request, context): """Deletes the specified occurrence. For example, use this method to delete an - occurrence when the occurrence is no longer applicable for the given - resource. - """ + occurrence when the occurrence is no longer applicable for the given + resource. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateOccurrence(self, request, context): - """Creates a new occurrence. - """ + """Creates a new occurrence.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchCreateOccurrences(self, request, context): - """Creates new occurrences in batch. - """ + """Creates new occurrences in batch.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateOccurrence(self, request, context): - """Updates the specified occurrence. - """ + """Updates the specified occurrence.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetOccurrenceNote(self, request, context): """Gets the note attached to the specified occurrence. Consumer projects can - use this method to get a note that belongs to a provider project. - """ + use this method to get a note that belongs to a provider project. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetNote(self, request, context): - """Gets the specified note. - """ + """Gets the specified note.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListNotes(self, request, context): - """Lists notes for the specified project. - """ + """Lists notes for the specified project.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteNote(self, request, context): - """Deletes the specified note. - """ + """Deletes the specified note.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateNote(self, request, context): - """Creates a new note. - """ + """Creates a new note.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchCreateNotes(self, request, context): - """Creates new notes in batch. - """ + """Creates new notes in batch.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateNote(self, request, context): - """Updates the specified note. - """ + """Updates the specified note.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListNoteOccurrences(self, request, context): """Lists occurrences referencing the specified note. Provider projects can use - this method to get all occurrences across consumer projects referencing the - specified note. - """ + this method to get all occurrences across consumer projects referencing the + specified note. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/grafeas/grafeas_v1/proto/package_pb2.py b/grafeas/grafeas_v1/proto/package_pb2.py index a3a5640..01835dc 100644 --- a/grafeas/grafeas_v1/proto/package_pb2.py +++ b/grafeas/grafeas_v1/proto/package_pb2.py @@ -556,7 +556,9 @@ ], extensions=[], nested_types=[], - enum_types=[_VERSION_VERSIONKIND,], + enum_types=[ + _VERSION_VERSIONKIND, + ], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/grafeas/grafeas_v1/proto/provenance_pb2.py b/grafeas/grafeas_v1/proto/provenance_pb2.py index 35f3f88..92899fa 100644 --- a/grafeas/grafeas_v1/proto/provenance_pb2.py +++ b/grafeas/grafeas_v1/proto/provenance_pb2.py @@ -22,7 +22,9 @@ serialized_options=b"\n\rio.grafeas.v1P\001ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\242\002\003GRA", create_key=_descriptor._internal_create_key, serialized_pb=b'\n)grafeas/grafeas_v1/proto/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tB_\n\rio.grafeas.v1P\x01ZFgoogle.golang.org/genproto/googleapis/grafeas/grafeas_v1/proto;grafeas\xa2\x02\x03GRAb\x06proto3', - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,], + dependencies=[ + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + ], ) @@ -390,7 +392,9 @@ ), ], extensions=[], - nested_types=[_BUILDPROVENANCE_BUILDOPTIONSENTRY,], + nested_types=[ + _BUILDPROVENANCE_BUILDOPTIONSENTRY, + ], enum_types=[], serialized_options=None, is_extendable=False, @@ -547,7 +551,9 @@ ), ], extensions=[], - nested_types=[_SOURCE_FILEHASHESENTRY,], + nested_types=[ + _SOURCE_FILEHASHESENTRY, + ], enum_types=[], serialized_options=None, is_extendable=False, @@ -1020,7 +1026,9 @@ ), ], extensions=[], - nested_types=[_SOURCECONTEXT_LABELSENTRY,], + nested_types=[ + _SOURCECONTEXT_LABELSENTRY, + ], enum_types=[], serialized_options=None, is_extendable=False, @@ -1090,7 +1098,9 @@ ], extensions=[], nested_types=[], - enum_types=[_ALIASCONTEXT_KIND,], + enum_types=[ + _ALIASCONTEXT_KIND, + ], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/grafeas/grafeas_v1/proto/upgrade_pb2.py b/grafeas/grafeas_v1/proto/upgrade_pb2.py index 9d7ed01..2a7dbfb 100644 --- a/grafeas/grafeas_v1/proto/upgrade_pb2.py +++ b/grafeas/grafeas_v1/proto/upgrade_pb2.py @@ -489,7 +489,10 @@ ), ], extensions=[], - nested_types=[_WINDOWSUPDATE_IDENTITY, _WINDOWSUPDATE_CATEGORY,], + nested_types=[ + _WINDOWSUPDATE_IDENTITY, + _WINDOWSUPDATE_CATEGORY, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/grafeas/grafeas_v1/proto/vulnerability_pb2.py b/grafeas/grafeas_v1/proto/vulnerability_pb2.py index 03199da..7a016a5 100644 --- a/grafeas/grafeas_v1/proto/vulnerability_pb2.py +++ b/grafeas/grafeas_v1/proto/vulnerability_pb2.py @@ -506,7 +506,9 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE,], + nested_types=[ + _VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE, + ], enum_types=[], serialized_options=None, is_extendable=False, @@ -641,7 +643,10 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYNOTE_DETAIL, _VULNERABILITYNOTE_WINDOWSDETAIL,], + nested_types=[ + _VULNERABILITYNOTE_DETAIL, + _VULNERABILITYNOTE_WINDOWSDETAIL, + ], enum_types=[], serialized_options=None, is_extendable=False, @@ -988,7 +993,9 @@ ), ], extensions=[], - nested_types=[_VULNERABILITYOCCURRENCE_PACKAGEISSUE,], + nested_types=[ + _VULNERABILITYOCCURRENCE_PACKAGEISSUE, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/noxfile.py b/noxfile.py index e887520..18bcab5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -21,44 +21,47 @@ import nox -@nox.session(python="3.7") +BLACK_VERSION = "black==22.3.0" +BLACK_PATHS = ["docs", "grafeas", "tests", "noxfile.py", "setup.py"] + +DEFAULT_PYTHON_VERSION = "3.8" +SYSTEM_TEST_PYTHON_VERSIONS = ["2.7", "3.8"] +UNIT_TEST_PYTHON_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + + +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): """Run linters. Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", "black") + session.install("flake8", BLACK_VERSION, "click<8.1") session.run( "black", "--check", - "grafeas", - "tests", - "docs", + *BLACK_PATHS, ) session.run("flake8", "grafeas", "tests") -@nox.session(python="3.6") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard. - - This currently uses Python 3.6 due to the automated Kokoro run of synthtool. - That run uses an image that doesn't have 3.6 installed. Before updating this - check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ - session.install("black") + session.install(BLACK_VERSION) session.run( "black", - "grafeas", - "tests", - "docs", + *BLACK_PATHS, ) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" session.install("docutils", "pygments") @@ -85,17 +88,21 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): """Run the unit test suite.""" default(session) -@nox.session(python=["2.7", "3.7"]) +@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") system_test_folder_path = os.path.join("tests", "system") + + # Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true. + if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false": + session.skip("RUN_SYSTEM_TESTS is set to false, skipping") # Sanity check: Only run tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): session.skip("Credentials must be set via environment variable") @@ -111,7 +118,11 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install("mock", "pytest", "google-cloud-testutils") + session.install( + "mock", + "pytest", + "google-cloud-testutils", + ) session.install("-e", ".") # Run py.test against the system tests. @@ -121,7 +132,7 @@ def system(session): session.run("py.test", "--quiet", system_test_folder_path, *session.posargs) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def cover(session): """Run the final coverage report. @@ -129,25 +140,27 @@ 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=78") + session.run("coverage", "report", "--show-missing", "--fail-under=77") session.run("coverage", "erase") -@nox.session(python="3.7") + +@nox.session(python=DEFAULT_PYTHON_VERSION) def docs(session): """Build the docs for this library.""" + session.install("-e", ".") + session.install("sphinx<3", "jinja2<3.1", "alabaster", "recommonmark") - session.install('-e', '.') - session.install('sphinx<3.0.0', 'alabaster', 'recommonmark') - - shutil.rmtree(os.path.join('docs', '_build'), ignore_errors=True) + shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( - 'sphinx-build', - '-W', # warnings as errors - '-T', # show full traceback on exception - '-N', # no colors - '-b', 'html', - '-d', os.path.join('docs', '_build', 'doctrees', ''), - os.path.join('docs', ''), - os.path.join('docs', '_build', 'html', ''), + "sphinx-build", + "-W", # warnings as errors + "-T", # show full traceback on exception + "-N", # no colors + "-b", + "html", + "-d", + os.path.join("docs", "_build", "doctrees", ""), + os.path.join("docs", ""), + os.path.join("docs", "_build", "html", ""), ) diff --git a/setup.py b/setup.py index b3a69bc..1608992 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ version = "0.4.1" release_status = "Development Status :: 3 - Alpha" dependencies = [ - "google-api-core[grpc] >= 1.14.0, < 2.0.0dev", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", 'enum34; python_version < "3.4"', ]