diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 108063d..44c78f7 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,16 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# 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 +# +# 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:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60 + digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index be888a9..193b436 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,9 +3,10 @@ # # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax +# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json. -# The @googleapis/yoshi-python is the default owner for changes in this repo -* @googleapis/yoshi-python +# @googleapis/yoshi-python @googleapis/api-bigquery are the default owners for changes in this repo +* @googleapis/yoshi-python @googleapis/api-bigquery - -/samples/ @googleapis/python-samples-owners +# @googleapis/python-samples-reviewers @googleapis/api-bigquery are the default owners for samples changes +/samples/ @googleapis/python-samples-reviewers @googleapis/api-bigquery diff --git a/.github/release-please.yml b/.github/release-please.yml index 4507ad0..466597e 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1 +1,2 @@ releaseType: python +handleGHRelease: true diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 0000000..d4ca941 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..b46d730 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +on: + pull_request: + branches: + - main +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.10" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run docs + run: | + nox -s docs + docfx: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run docfx + run: | + nox -s docfx diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f512a49 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,25 @@ +on: + pull_request: + branches: + - main +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.10" + - 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..e5be6ed --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,57 @@ +on: + pull_request: + branches: + - main +name: unittest +jobs: + unit: + runs-on: ubuntu-latest + strategy: + matrix: + python: ['3.6', '3.7', '3.8', '3.9', '3.10'] + 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.10" + - 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=100 diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 96b4f67..afa2232 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_GFILE_DIR}/secret_manager/google-cloud-pypi-token") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-bigquery-logging python3 setup.py sdist bdist_wheel twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 42d36f6..a8e982f 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,8 +23,18 @@ env_vars: { value: "github/python-bigquery-logging/.kokoro/release.sh" } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-pypi-token-keystore-1" + } + } +} + # 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,google-cloud-pypi-token" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } diff --git a/.repo-metadata.json b/.repo-metadata.json index 16be284..eff14b4 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -2,14 +2,15 @@ "name": "bigquerylogging", "name_pretty": "BigQuery Logging Protos", "product_documentation": "https://cloud.google.com/bigquery/docs/reference/auditlogs", - "client_documentation": "https://googleapis.dev/python/bigquerylogging/latest", + "client_documentation": "https://cloud.google.com/python/docs/reference/bigquerylogging/latest", "issue_tracker": "https://github.com/googleapis/python-bigquerylogging/issues", - "release_level": "ga", + "release_level": "stable", "language": "python", "library_type": "OTHER", "repo": "googleapis/python-bigquery-logging", "distribution_name": "google-cloud-bigquery-logging", "api_id": "", "default_version": "v1", - "codeowner_team": "@googleapis/api-bigquery" + "codeowner_team": "@googleapis/api-bigquery", + "api_shortname": "bigquerylogging" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a5d76..13f070a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.2](https://github.com/googleapis/python-bigquery-logging/compare/v1.0.1...v1.0.2) (2022-03-05) + + +### Bug Fixes + +* **deps:** require google-api-core>=1.31.5, >=2.3.2 ([#72](https://github.com/googleapis/python-bigquery-logging/issues/72)) ([609bf19](https://github.com/googleapis/python-bigquery-logging/commit/609bf19d1b3d4b7dc594f8e4a0904af0351143c7)) + ### [1.0.1](https://www.github.com/googleapis/python-bigquery-logging/compare/v1.0.0...v1.0.1) (2021-11-01) ### Bug Fixes diff --git a/README.rst b/README.rst index a41e04d..3eb4b3d 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ This package contains generated Python types for ``google.cloud.bigquery.v1.logg :target: https://pypi.org/project/google-cloud-bigquery-logging/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-bigquery-logging.svg :target: https://pypi.org/project/google-cloud-bigquery-logging/ -.. _Client Library Documentation: https://googleapis.dev/python/bigquerylogging/latest +.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/bigquerylogging/latest .. _Product Documentation: https://cloud.google.com/bigquery/docs/reference/auditlogs diff --git a/google/cloud/bigquery_logging/__init__.py b/google/cloud/bigquery_logging/__init__.py index dfe609f..138a7b6 100644 --- a/google/cloud/bigquery_logging/__init__.py +++ b/google/cloud/bigquery_logging/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/bigquery_logging_v1/__init__.py b/google/cloud/bigquery_logging_v1/__init__.py index 80486fe..fa17225 100644 --- a/google/cloud/bigquery_logging_v1/__init__.py +++ b/google/cloud/bigquery_logging_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/bigquery_logging_v1/services/__init__.py b/google/cloud/bigquery_logging_v1/services/__init__.py index 4de6597..e8e1c38 100644 --- a/google/cloud/bigquery_logging_v1/services/__init__.py +++ b/google/cloud/bigquery_logging_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/bigquery_logging_v1/types/__init__.py b/google/cloud/bigquery_logging_v1/types/__init__.py index 0fdb518..4b50f07 100644 --- a/google/cloud/bigquery_logging_v1/types/__init__.py +++ b/google/cloud/bigquery_logging_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/bigquery_logging_v1/types/audit_data.py b/google/cloud/bigquery_logging_v1/types/audit_data.py index b558182..40a31dc 100644 --- a/google/cloud/bigquery_logging_v1/types/audit_data.py +++ b/google/cloud/bigquery_logging_v1/types/audit_data.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -80,61 +80,80 @@ class AuditData(proto.Message): Attributes: table_insert_request (google.cloud.bigquery_logging_v1.types.TableInsertRequest): Table insert request. + This field is a member of `oneof`_ ``request``. table_update_request (google.cloud.bigquery_logging_v1.types.TableUpdateRequest): Table update request. + This field is a member of `oneof`_ ``request``. dataset_list_request (google.cloud.bigquery_logging_v1.types.DatasetListRequest): Dataset list request. + This field is a member of `oneof`_ ``request``. dataset_insert_request (google.cloud.bigquery_logging_v1.types.DatasetInsertRequest): Dataset insert request. + This field is a member of `oneof`_ ``request``. dataset_update_request (google.cloud.bigquery_logging_v1.types.DatasetUpdateRequest): Dataset update request. + This field is a member of `oneof`_ ``request``. job_insert_request (google.cloud.bigquery_logging_v1.types.JobInsertRequest): Job insert request. + This field is a member of `oneof`_ ``request``. job_query_request (google.cloud.bigquery_logging_v1.types.JobQueryRequest): Job query request. + This field is a member of `oneof`_ ``request``. job_get_query_results_request (google.cloud.bigquery_logging_v1.types.JobGetQueryResultsRequest): Job get query results request. + This field is a member of `oneof`_ ``request``. table_data_list_request (google.cloud.bigquery_logging_v1.types.TableDataListRequest): Table data-list request. + This field is a member of `oneof`_ ``request``. set_iam_policy_request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest): Iam policy request. + This field is a member of `oneof`_ ``request``. table_insert_response (google.cloud.bigquery_logging_v1.types.TableInsertResponse): Table insert response. + This field is a member of `oneof`_ ``response``. table_update_response (google.cloud.bigquery_logging_v1.types.TableUpdateResponse): Table update response. + This field is a member of `oneof`_ ``response``. dataset_insert_response (google.cloud.bigquery_logging_v1.types.DatasetInsertResponse): Dataset insert response. + This field is a member of `oneof`_ ``response``. dataset_update_response (google.cloud.bigquery_logging_v1.types.DatasetUpdateResponse): Dataset update response. + This field is a member of `oneof`_ ``response``. job_insert_response (google.cloud.bigquery_logging_v1.types.JobInsertResponse): Job insert response. + This field is a member of `oneof`_ ``response``. job_query_response (google.cloud.bigquery_logging_v1.types.JobQueryResponse): Job query response. + This field is a member of `oneof`_ ``response``. job_get_query_results_response (google.cloud.bigquery_logging_v1.types.JobGetQueryResultsResponse): Job get query results response. + This field is a member of `oneof`_ ``response``. job_query_done_response (google.cloud.bigquery_logging_v1.types.JobQueryDoneResponse): Deprecated: Job query-done response. Use this information for usage analysis. + This field is a member of `oneof`_ ``response``. policy_response (google.iam.v1.policy_pb2.Policy): Iam Policy. + This field is a member of `oneof`_ ``response``. job_completed_event (google.cloud.bigquery_logging_v1.types.JobCompletedEvent): A job completion event. @@ -673,15 +692,19 @@ class JobConfiguration(proto.Message): Attributes: query (google.cloud.bigquery_logging_v1.types.JobConfiguration.Query): Query job information. + This field is a member of `oneof`_ ``configuration``. load (google.cloud.bigquery_logging_v1.types.JobConfiguration.Load): Load job information. + This field is a member of `oneof`_ ``configuration``. extract (google.cloud.bigquery_logging_v1.types.JobConfiguration.Extract): Extract job information. + This field is a member of `oneof`_ ``configuration``. table_copy (google.cloud.bigquery_logging_v1.types.JobConfiguration.TableCopy): TableCopy job information. + This field is a member of `oneof`_ ``configuration``. dry_run (bool): If true, don't actually run the job. Just @@ -917,8 +940,8 @@ class ReservationResourceUsage(proto.Message): Attributes: name (str): - Reservation name or "unreserved" for on- - emand resources usage. + Reservation name or "unreserved" for + on-demand resources usage. slot_ms (int): Total slot milliseconds used by the reservation for a particular job. diff --git a/scripts/fixup_bigquery_logging_v1_keywords.py b/scripts/fixup_bigquery_logging_v1_keywords.py index 35709a8..72ad5ca 100644 --- a/scripts/fixup_bigquery_logging_v1_keywords.py +++ b/scripts/fixup_bigquery_logging_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index fb14860..64d80db 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ import os import setuptools # type: ignore -version = "1.0.1" +version = "1.0.2" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -45,7 +45,7 @@ # NOTE: Maintainers, please do not require google-api-core>=2.x.x # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 - "google-api-core[grpc] >= 1.28.0, < 3.0.0dev", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "proto-plus >= 1.15.0", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", ), diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index d65af40..fca766f 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -5,6 +5,6 @@ # # e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", # Then this file should have foo==1.14.0 -google-api-core==1.28.0 +google-api-core==1.31.5 proto-plus==1.15.0 grpc-google-iam-v1==0.12.3 diff --git a/tests/__init__.py b/tests/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/__init__.py b/tests/unit/gapic/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/gapic/__init__.py +++ b/tests/unit/gapic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/bigquery_logging_v1/__init__.py b/tests/unit/gapic/bigquery_logging_v1/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/gapic/bigquery_logging_v1/__init__.py +++ b/tests/unit/gapic/bigquery_logging_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.