diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 7d98291..108063d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:58f73ba196b5414782605236dd0712a73541b44ff2ff4d3a36ec41092dd6fa5b + digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60 diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index b6ec3bb..0f124a6 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -30,6 +30,7 @@ env_vars: { env_vars: { key: "V2_STAGING_BUCKET" + # Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2` value: "docs-staging-v2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 760b6df..01a5d76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [1.0.1](https://www.github.com/googleapis/python-bigquery-logging/compare/v1.0.0...v1.0.1) (2021-11-01) + +### Bug Fixes + +* **deps:** drop packaging dependency ([a5b1978](https://www.github.com/googleapis/python-bigquery-logging/commit/a5b19782e2ac30f5de150fb873d777fa121bd0ad)) +* **deps:** require google-api-core >= 1.28.0 ([a5b1978](https://www.github.com/googleapis/python-bigquery-logging/commit/a5b19782e2ac30f5de150fb873d777fa121bd0ad)) + + +### Documentation + +* list oneofs in docstring ([a5b1978](https://www.github.com/googleapis/python-bigquery-logging/commit/a5b19782e2ac30f5de150fb873d777fa121bd0ad)) + ## [1.0.0](https://www.github.com/googleapis/python-bigquery-logging/compare/v0.3.0...v1.0.0) (2021-10-12) diff --git a/docs/index.rst b/docs/index.rst index e6518cf..cd4a796 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,6 +2,7 @@ .. include:: multiprocessing.rst + API Reference ------------- .. toctree:: @@ -17,6 +18,6 @@ Changelog For a list of all ``google-cloud-bigquery-logging`` releases: .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - changelog + changelog diff --git a/google/cloud/bigquery_logging_v1/types/audit_data.py b/google/cloud/bigquery_logging_v1/types/audit_data.py index a6efed7..b558182 100644 --- a/google/cloud/bigquery_logging_v1/types/audit_data.py +++ b/google/cloud/bigquery_logging_v1/types/audit_data.py @@ -70,46 +70,72 @@ class AuditData(proto.Message): ``Table.schemaJson``. ``Table.schema`` may continue to be present in your logs during this transition. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + 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. table_data_read_events (Sequence[google.cloud.bigquery_logging_v1.types.TableDataReadEvent]): @@ -637,15 +663,26 @@ class JobConfiguration(proto.Message): `Jobs `__ API resource for more details on individual fields. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + 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 check that it would run. diff --git a/noxfile.py b/noxfile.py index 2bb4cf7..2a2001c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,7 +101,7 @@ def default(session): "py.test", "--quiet", f"--junitxml=unit_{session.python}_sponge_log.xml", - "--cov=google/cloud", + "--cov=google", "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index b3c04a2..0000000 --- a/owlbot.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 2021 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. - - -"""This script is used to synthesize generated parts of this library.""" - -import os -import synthtool as s -import synthtool.gcp as gcp -from synthtool.languages import python - -common = gcp.CommonTemplates() - -default_version = "v1" - -for library in s.get_staging_dirs(default_version): - s.move(library, excludes=["docs/index.rst", "setup.py", "README.rst"]) - -s.remove_staging_dirs() - -templated_files = common.py_library(microgenerator=True) - -excludes=[".coveragerc"] -s.move(templated_files, excludes=excludes) - -# Remove the replacements below once -# https://github.com/googleapis/synthtool/pull/1188 is merged - -# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files -s.replace( - ".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main" -) - -# Customize CONTRIBUTING.rst to replace master with main -s.replace( - "CONTRIBUTING.rst", - "fetch and merge changes from upstream into master", - "fetch and merge changes from upstream into main", -) - -s.replace( - "CONTRIBUTING.rst", - "git merge upstream/master", - "git merge upstream/main", -) - -s.replace( - "CONTRIBUTING.rst", - """export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""", - """export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""", -) - -s.replace( - "CONTRIBUTING.rst", - "remote \(``master``\)", - "remote (``main``)", -) - -s.replace( - "CONTRIBUTING.rst", - "blob/master/CONTRIBUTING.rst", - "blob/main/CONTRIBUTING.rst", -) - -s.replace( - "CONTRIBUTING.rst", - "blob/master/noxfile.py", - "blob/main/noxfile.py", -) - -s.replace( - "docs/conf.py", - "master_doc", - "root_doc", -) - -s.replace( - "docs/conf.py", - "# The master toctree document.", - "# The root toctree document.", -) - -s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/setup.py b/setup.py index 8e0d986..fb14860 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ import os import setuptools # type: ignore -version = "1.0.0" +version = "1.0.1" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -45,9 +45,8 @@ # 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.22.2, < 3.0.0dev", + "google-api-core[grpc] >= 1.28.0, < 3.0.0dev", "proto-plus >= 1.15.0", - "packaging >= 14.3", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", ), python_requires=">=3.6", diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 2187f5e..d65af40 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -5,8 +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.22.2 +google-api-core==1.28.0 proto-plus==1.15.0 -packaging==14.3 grpc-google-iam-v1==0.12.3 -google-auth==1.24.0 # TODO: remove once google-auth>=1.25.0 is required transitively through google-api-core