From 7cc3d266e27f00e61176cd4aaa98aef82124177e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Apr 2021 18:48:03 +0000 Subject: [PATCH] build: update .OwlBot.lock with new version of post-processor (#132) This PR updates the docker container used for OwlBot. This container performs post-processing tasks when pull-requests are opened on your repository, such as: * copying generated files into place. * generating common files from templates. Version sha256:c0deb0984dd1c56fa04aaf6974f23f4fe674d80f4329310c3f52cd46c40b7419 was published at 2021-04-16T11:10:24.059Z. --- .../.github/.OwlBot.lock.yaml | 5 ++--- .../.github/header-checker-lint.yml | 2 +- .../.kokoro/release.sh | 4 ++-- .../.kokoro/release/common.cfg | 14 ++------------ .../.pre-commit-config.yaml | 14 ++++++++++++++ .../docs/_static/custom.css | 13 ++++++++++++- .../docs/conf.py | 13 +++++++++++++ .../renovate.json | 5 ++++- .../samples/snippets/noxfile.py | 10 ++++++++-- 9 files changed, 58 insertions(+), 22 deletions(-) diff --git a/packages/google-cloud-bigquery-datatransfer/.github/.OwlBot.lock.yaml b/packages/google-cloud-bigquery-datatransfer/.github/.OwlBot.lock.yaml index 9bdafee727d1..38ffa66dddb0 100644 --- a/packages/google-cloud-bigquery-datatransfer/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-bigquery-datatransfer/.github/.OwlBot.lock.yaml @@ -1,4 +1,3 @@ docker: - digest: sha256:612842ba5ccf62b4e3983fe6dc453cf66883c74bc168aa62da7acaed1e2fdc93 - image: gcr.io/repo-automation-bots/owlbot-python:latest - + digest: sha256:c0deb0984dd1c56fa04aaf6974f23f4fe674d80f4329310c3f52cd46c40b7419 + image: gcr.io/repo-automation-bots/owlbot-python:latest diff --git a/packages/google-cloud-bigquery-datatransfer/.github/header-checker-lint.yml b/packages/google-cloud-bigquery-datatransfer/.github/header-checker-lint.yml index fc281c05bd55..6fe78aa7987a 100644 --- a/packages/google-cloud-bigquery-datatransfer/.github/header-checker-lint.yml +++ b/packages/google-cloud-bigquery-datatransfer/.github/header-checker-lint.yml @@ -1,6 +1,6 @@ {"allowedCopyrightHolders": ["Google LLC"], "allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"], - "ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt"], + "ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"], "sourceFileExtensions": [ "ts", "js", diff --git a/packages/google-cloud-bigquery-datatransfer/.kokoro/release.sh b/packages/google-cloud-bigquery-datatransfer/.kokoro/release.sh index 76c8ed2f9579..064ab4b97d1e 100755 --- a/packages/google-cloud-bigquery-datatransfer/.kokoro/release.sh +++ b/packages/google-cloud-bigquery-datatransfer/.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_GFILE_DIR}/secret_manager/google-cloud-pypi-token") cd github/python-bigquery-datatransfer 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/packages/google-cloud-bigquery-datatransfer/.kokoro/release/common.cfg b/packages/google-cloud-bigquery-datatransfer/.kokoro/release/common.cfg index 437024a8bd54..ec1f22103456 100644 --- a/packages/google-cloud-bigquery-datatransfer/.kokoro/release/common.cfg +++ b/packages/google-cloud-bigquery-datatransfer/.kokoro/release/common.cfg @@ -23,18 +23,8 @@ env_vars: { value: "github/python-bigquery-datatransfer/.kokoro/release.sh" } -# Fetch PyPI password -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" - } - } -} - # 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" -} \ No newline at end of file + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token" +} diff --git a/packages/google-cloud-bigquery-datatransfer/.pre-commit-config.yaml b/packages/google-cloud-bigquery-datatransfer/.pre-commit-config.yaml index 32302e4883a1..8912e9b5d7d7 100644 --- a/packages/google-cloud-bigquery-datatransfer/.pre-commit-config.yaml +++ b/packages/google-cloud-bigquery-datatransfer/.pre-commit-config.yaml @@ -1,3 +1,17 @@ +# 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. +# # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: diff --git a/packages/google-cloud-bigquery-datatransfer/docs/_static/custom.css b/packages/google-cloud-bigquery-datatransfer/docs/_static/custom.css index bcd37bbd3c4a..b0a295464b23 100644 --- a/packages/google-cloud-bigquery-datatransfer/docs/_static/custom.css +++ b/packages/google-cloud-bigquery-datatransfer/docs/_static/custom.css @@ -1,9 +1,20 @@ div#python2-eol { border-color: red; border-width: medium; -} +} /* Ensure minimum width for 'Parameters' / 'Returns' column */ dl.field-list > dt { min-width: 100px } + +/* Insert space between methods for readability */ +dl.method { + padding-top: 10px; + padding-bottom: 10px +} + +/* Insert empty space between classes */ +dl.class { + padding-bottom: 50px +} diff --git a/packages/google-cloud-bigquery-datatransfer/docs/conf.py b/packages/google-cloud-bigquery-datatransfer/docs/conf.py index 8e9ba3163a92..69ebdaa33065 100644 --- a/packages/google-cloud-bigquery-datatransfer/docs/conf.py +++ b/packages/google-cloud-bigquery-datatransfer/docs/conf.py @@ -1,4 +1,17 @@ # -*- coding: utf-8 -*- +# 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. # # google-cloud-bigquery-datatransfer documentation build configuration file # diff --git a/packages/google-cloud-bigquery-datatransfer/renovate.json b/packages/google-cloud-bigquery-datatransfer/renovate.json index f08bc22c9a55..c04895563e69 100644 --- a/packages/google-cloud-bigquery-datatransfer/renovate.json +++ b/packages/google-cloud-bigquery-datatransfer/renovate.json @@ -2,5 +2,8 @@ "extends": [ "config:base", ":preserveSemverRanges" ], - "ignorePaths": [".pre-commit-config.yaml"] + "ignorePaths": [".pre-commit-config.yaml"], + "pip_requirements": { + "fileMatch": ["requirements-test.txt", "samples/[\\S/]*constraints.txt", "samples/[\\S/]*constraints-test.txt"] + } } diff --git a/packages/google-cloud-bigquery-datatransfer/samples/snippets/noxfile.py b/packages/google-cloud-bigquery-datatransfer/samples/snippets/noxfile.py index 97bf7da80e39..956cdf4f9250 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/snippets/noxfile.py +++ b/packages/google-cloud-bigquery-datatransfer/samples/snippets/noxfile.py @@ -172,10 +172,16 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): - session.install("-r", "requirements.txt") + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") if os.path.exists("requirements-test.txt"): - session.install("-r", "requirements-test.txt") + if os.path.exists("constraints-test.txt"): + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") + else: + session.install("-r", "requirements-test.txt") if INSTALL_LIBRARY_FROM_SOURCE: session.install("-e", _get_repo_root())