From 03257ceec599496442928cbaa5798a18104f5225 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 16:32:30 +0000 Subject: [PATCH 01/17] chore: fix INSTALL_LIBRARY_FROM_SOURCE in noxfile.py (#270) Source-Link: https://github.com/googleapis/synthtool/commit/6252f2cd074c38f37b44abe5e96d128733eb1b61 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc --- .github/.OwlBot.lock.yaml | 2 +- samples/quickstart/noxfile.py | 5 ++++- samples/to_dataframe/noxfile.py | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9ee60f7e..649877dc 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b + digest: sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc diff --git a/samples/quickstart/noxfile.py b/samples/quickstart/noxfile.py index 9fc7f178..7dbea091 100644 --- a/samples/quickstart/noxfile.py +++ b/samples/quickstart/noxfile.py @@ -94,7 +94,10 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # diff --git a/samples/to_dataframe/noxfile.py b/samples/to_dataframe/noxfile.py index 9fc7f178..7dbea091 100644 --- a/samples/to_dataframe/noxfile.py +++ b/samples/to_dataframe/noxfile.py @@ -94,7 +94,10 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # From d10a2163f66375ab72ce3b1a35ec90d81ed87b16 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Wed, 11 Aug 2021 12:04:13 -0500 Subject: [PATCH 02/17] chore: remove unused samples (#268) Follow-up to https://github.com/googleapis/python-bigquery-storage/issues/225 I noticed we didn't need several of these samples now that BQ Storage API is used by default. --- samples/to_dataframe/jupyter_test.py | 48 ---------------------------- 1 file changed, 48 deletions(-) diff --git a/samples/to_dataframe/jupyter_test.py b/samples/to_dataframe/jupyter_test.py index 7997ee2e..c2046b8c 100644 --- a/samples/to_dataframe/jupyter_test.py +++ b/samples/to_dataframe/jupyter_test.py @@ -49,60 +49,12 @@ def _strip_region_tags(sample_text): return "\n".join(magic_lines) -def test_jupyter_small_query(ipython): - ip = IPython.get_ipython() - ip.extension_manager.load_extension("google.cloud.bigquery") - - # Include a small query to demonstrate that it falls back to the - # tabledata.list API when the BQ Storage API cannot be used. - sample = """ - # [START bigquerystorage_jupyter_tutorial_fallback] - %%bigquery stackoverflow --use_bqstorage_api - SELECT - CONCAT( - 'https://stackoverflow.com/questions/', - CAST(id as STRING)) as url, - view_count - FROM `bigquery-public-data.stackoverflow.posts_questions` - WHERE tags like '%google-bigquery%' - ORDER BY view_count DESC - LIMIT 10 - # [END bigquerystorage_jupyter_tutorial_fallback] - """ - - result = ip.run_cell(_strip_region_tags(sample)) - result.raise_error() # Throws an exception if the cell failed. - assert "stackoverflow" in ip.user_ns # verify that variable exists - - def test_jupyter_tutorial(ipython): ip = IPython.get_ipython() ip.extension_manager.load_extension("google.cloud.bigquery") # This code sample intentionally queries a lot of data to demonstrate the # speed-up of using the BigQuery Storage API to download the results. - sample = """ - # [START bigquerystorage_jupyter_tutorial_query] - %%bigquery tax_forms --use_bqstorage_api - SELECT * FROM `bigquery-public-data.irs_990.irs_990_2012` - # [END bigquerystorage_jupyter_tutorial_query] - """ - result = ip.run_cell(_strip_region_tags(sample)) - result.raise_error() # Throws an exception if the cell failed. - - assert "tax_forms" in ip.user_ns # verify that variable exists - tax_forms = ip.user_ns["tax_forms"] - - # [START bigquerystorage_jupyter_tutorial_results] - tax_forms.head() - # [END bigquerystorage_jupyter_tutorial_results] - - # [START bigquerystorage_jupyter_tutorial_context] - import google.cloud.bigquery.magics - - google.cloud.bigquery.magics.context.use_bqstorage_api = True - # [END bigquerystorage_jupyter_tutorial_context] - sample = """ # [START bigquerystorage_jupyter_tutorial_query_default] %%bigquery tax_forms From b6c9b789af305208bac162ea7a799f96da6bcc67 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 12 Aug 2021 16:18:32 +0000 Subject: [PATCH 03/17] chore(python): avoid `.nox` directories when building docs (#271) Source-Link: https://github.com/googleapis/synthtool/commit/7e1f6da50524b5d98eb67adbf6dd0805df54233d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d --- .github/.OwlBot.lock.yaml | 2 +- docs/conf.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 649877dc..b771c37c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc + digest: sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d diff --git a/docs/conf.py b/docs/conf.py index a5fd6693..3b4b5268 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,6 +110,7 @@ # directories to ignore when looking for source files. exclude_patterns = [ "_build", + "**/.nox/**/*", "samples/AUTHORING_GUIDE.md", "samples/CONTRIBUTING.md", "samples/snippets/README.rst", From eb46d176540e96ccd4ebf4b6c7bb75937ecc56e4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Aug 2021 11:51:48 -0400 Subject: [PATCH 04/17] chore: drop mention of Python 2.7 from templates (#272) Source-Link: https://github.com/googleapis/synthtool/commit/facee4cc1ea096cd8bcc008bb85929daa7c414c0 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- noxfile.py | 12 +++++++++--- samples/quickstart/noxfile.py | 6 +++--- samples/to_dataframe/noxfile.py | 6 +++--- scripts/readme-gen/templates/install_deps.tmpl.rst | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b771c37c..a9fcd07c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d + digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 diff --git a/noxfile.py b/noxfile.py index f26e74c1..3493eb27 100644 --- a/noxfile.py +++ b/noxfile.py @@ -84,9 +84,15 @@ def default(session): constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) - - session.install("mock", "pytest", "pytest-cov", "-c", constraints_path) + session.install( + "mock", + "asyncmock", + "pytest", + "pytest-cov", + "pytest-asyncio", + "-c", + constraints_path, + ) session.install("-e", ".[fastavro,pandas,pyarrow]", "-c", constraints_path) diff --git a/samples/quickstart/noxfile.py b/samples/quickstart/noxfile.py index 7dbea091..b008613f 100644 --- a/samples/quickstart/noxfile.py +++ b/samples/quickstart/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7"], + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, @@ -86,8 +86,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/samples/to_dataframe/noxfile.py b/samples/to_dataframe/noxfile.py index 7dbea091..b008613f 100644 --- a/samples/to_dataframe/noxfile.py +++ b/samples/to_dataframe/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7"], + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, @@ -86,8 +86,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst index a0406dba..275d6498 100644 --- a/scripts/readme-gen/templates/install_deps.tmpl.rst +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -12,7 +12,7 @@ Install Dependencies .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup -#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. +#. Create a virtualenv. Samples are compatible with Python 3.6+. .. code-block:: bash From 1a3bc17cdd9a4d396714192064f14f5069a75e65 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 13 Aug 2021 20:25:40 +0200 Subject: [PATCH 05/17] chore(deps): update dependency google-cloud-bigquery to v2.24.0 (#267) Co-authored-by: Anthonios Partheniou --- samples/to_dataframe/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index 6a851c9c..82717d0c 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,6 +1,6 @@ google-auth==1.34.0 google-cloud-bigquery-storage==2.6.2 -google-cloud-bigquery==2.23.2 +google-cloud-bigquery==2.24.0 pyarrow==5.0.0 ipython==7.24.0; python_version > '3.6' ipython==7.16.1; python_version <= '3.6' From bc2c1cff62eded63253ce12d97e766380aef5806 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 13 Aug 2021 20:51:21 +0200 Subject: [PATCH 06/17] chore(deps): update dependency google-cloud-bigquery-storage to v2.6.3 (#266) Co-authored-by: Anthonios Partheniou Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- samples/quickstart/requirements.txt | 2 +- samples/to_dataframe/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/quickstart/requirements.txt b/samples/quickstart/requirements.txt index 204c2729..a4b9ec9e 100644 --- a/samples/quickstart/requirements.txt +++ b/samples/quickstart/requirements.txt @@ -1,2 +1,2 @@ fastavro -google-cloud-bigquery-storage==2.6.2 +google-cloud-bigquery-storage==2.6.3 diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index 82717d0c..c21c4da0 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,5 +1,5 @@ google-auth==1.34.0 -google-cloud-bigquery-storage==2.6.2 +google-cloud-bigquery-storage==2.6.3 google-cloud-bigquery==2.24.0 pyarrow==5.0.0 ipython==7.24.0; python_version > '3.6' From 6406f17628bf095cc97599393ffd697fa4bd7ca3 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Mon, 16 Aug 2021 09:22:23 -0500 Subject: [PATCH 07/17] chore: add Yoshi and BigQuery teams to sample approvers (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-storage/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # 🦕 --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ae570eb0..1473ae01 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,4 +8,4 @@ * @googleapis/api-bigquery @googleapis/yoshi-python # The python-samples-reviewers team is the default owner for samples changes -/samples/ @googleapis/python-samples-owners +/samples/ @googleapis/python-samples-owners @googleapis/api-bigquery @googleapis/yoshi-python From d169db3f055d903b25c3aea047ea7d2d58056105 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 18 Aug 2021 19:03:40 +0200 Subject: [PATCH 08/17] chore(deps): update dependency google-auth to v1.35.0 (#274) --- samples/to_dataframe/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index c21c4da0..abb4bbe9 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,4 +1,4 @@ -google-auth==1.34.0 +google-auth==1.35.0 google-cloud-bigquery-storage==2.6.3 google-cloud-bigquery==2.24.0 pyarrow==5.0.0 From b463de45b9abdd639910d4855efdce78bc482bf4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Aug 2021 19:39:58 +0200 Subject: [PATCH 09/17] chore(deps): update dependency google-cloud-bigquery to v2.24.1 (#276) --- samples/to_dataframe/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index abb4bbe9..bcbc1db7 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,6 +1,6 @@ google-auth==1.35.0 google-cloud-bigquery-storage==2.6.3 -google-cloud-bigquery==2.24.0 +google-cloud-bigquery==2.24.1 pyarrow==5.0.0 ipython==7.24.0; python_version > '3.6' ipython==7.16.1; python_version <= '3.6' From 29436141e128b172e9bd42ac12f3ca06fc1947be Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Aug 2021 20:28:50 +0200 Subject: [PATCH 10/17] chore(deps): update dependency google-auth to v2 (#275) Co-authored-by: Tim Swast --- samples/to_dataframe/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index bcbc1db7..298847ea 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,4 +1,4 @@ -google-auth==1.35.0 +google-auth==2.0.1 google-cloud-bigquery-storage==2.6.3 google-cloud-bigquery==2.24.1 pyarrow==5.0.0 From caffb629eb102c86a430003bed5095b379e502d5 Mon Sep 17 00:00:00 2001 From: Peter Lamut Date: Thu, 26 Aug 2021 22:24:24 +0200 Subject: [PATCH 11/17] chore: migrate default branch to main (#283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate default branch from master to main * Remove additional references to `master` * Add replacements to owlbot.py to persist changes * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .github/sync-repo-settings.yaml | 8 ++--- .kokoro/build.sh | 2 +- .kokoro/test-samples-impl.sh | 2 +- CONTRIBUTING.rst | 12 +++---- docs/conf.py | 10 +++--- owlbot.py | 60 +++++++++++++++++++++++++++++---- 6 files changed, 71 insertions(+), 23 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 0ddb512d..3e98ae70 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -1,9 +1,9 @@ -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings -# Rules for master branch protection +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings +# Rules for main branch protection branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `master` -- pattern: master +# Defaults to `main` +- pattern: main requiresCodeOwnerReviews: true requiresStrictStatusChecks: true requiredStatusCheckContexts: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 78320ef6..10ae2fc5 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox python3 -m nox --version # If this is a continuous build, send the test log to the FlakyBot. -# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. +# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d54..8a324c9c 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 399d7627..f6de097e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout: # Configure remotes such that you can pull changes from the googleapis/python-bigquery-storage # repository into your local repository. $ git remote add upstream git@github.com:googleapis/python-bigquery-storage.git - # fetch and merge changes from upstream into master + # fetch and merge changes from upstream into main $ git fetch upstream - $ git merge upstream/master + $ git merge upstream/main Now your local repo is set up such that you will push changes to your GitHub repo, from which you can submit a pull request. @@ -110,12 +110,12 @@ Coding Style variables:: export GOOGLE_CLOUD_TESTING_REMOTE="upstream" - export GOOGLE_CLOUD_TESTING_BRANCH="master" + export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date version of ``python-bigquery-storage``. The the suggested remote name ``upstream`` should point to the official ``googleapis`` checkout and the - the branch should be the main branch on that remote (``master``). + the branch should be the main branch on that remote (``main``). - This repository contains configuration for the `pre-commit `__ tool, which automates checking @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-bigquery-storage/blob/master/CONTRIBUTING.rst``) +``https://github.com/googleapis/python-bigquery-storage/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-bigquery-storage @@ -234,7 +234,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-bigquery-storage/blob/master/noxfile.py +.. _config: https://github.com/googleapis/python-bigquery-storage/blob/main/noxfile.py We also explicitly decided to support Python 3 beginning with version 3.6. diff --git a/docs/conf.py b/docs/conf.py index 3b4b5268..7a4469e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,8 +76,8 @@ # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-cloud-bigquery-storage" @@ -280,7 +280,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ( - master_doc, + root_doc, "google-cloud-bigquery-storage.tex", "google-cloud-bigquery-storage Documentation", author, @@ -315,7 +315,7 @@ # (source start file, name, description, authors, manual section). man_pages = [ ( - master_doc, + root_doc, "google-cloud-bigquery-storage", "google-cloud-bigquery-storage Documentation", [author], @@ -334,7 +334,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-cloud-bigquery-storage", "google-cloud-bigquery-storage Documentation", author, diff --git a/owlbot.py b/owlbot.py index 9857c5b2..b96b16a4 100644 --- a/owlbot.py +++ b/owlbot.py @@ -26,10 +26,11 @@ for library in s.get_staging_dirs(default_version): # Work around gapic generator bug https://github.com/googleapis/gapic-generator-python/issues/902 - s.replace(library / f"google/cloud/bigquery_storage_{library.name}/types/arrow.py", - r""". + s.replace( + library / f"google/cloud/bigquery_storage_{library.name}/types/arrow.py", + r""". Attributes:""", - r""".\n + r""".\n Attributes:""", ) @@ -99,11 +100,12 @@ # The append_rows method doesn't contain keyword arguments that build request # objects, so flattened tests are not needed and break with TypeError. s.replace( - library / f'tests/unit/gapic/bigquery_storage_{library.name}*/test_big_query_write.py', + library + / f"tests/unit/gapic/bigquery_storage_{library.name}*/test_big_query_write.py", r"(@[a-z.()\n]*\n)?(async )?" r"def test_append_rows_flattened[_a-z]*\(\):\n" r"( {4}.*|\n)+", - '\n', + "\n", ) s.move( @@ -148,5 +150,51 @@ python.py_samples(skip_readmes=True) +# 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) \ No newline at end of file +s.shell.run(["nox", "-s", "blacken"], hide_output=False) From 7b7195b51be2ef8ab5bcb063d93d19931d283fe6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 Aug 2021 15:32:09 +0000 Subject: [PATCH 12/17] chore(python): disable dependency dashboard (#287) --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a9fcd07c..b75186cf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 + digest: sha256:d6761eec279244e57fe9d21f8343381a01d3632c034811a72f68b83119e58c69 diff --git a/renovate.json b/renovate.json index c0489556..9fa8816f 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,8 @@ { "extends": [ - "config:base", ":preserveSemverRanges" + "config:base", + ":preserveSemverRanges", + ":disableDependencyDashboard" ], "ignorePaths": [".pre-commit-config.yaml"], "pip_requirements": { From 171a7a232bd379afbd6807f5b016e9b8fd673534 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 12:55:54 +0200 Subject: [PATCH 13/17] chore(deps): update dependency google-auth to v2.0.2 (#289) --- samples/to_dataframe/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/to_dataframe/requirements.txt b/samples/to_dataframe/requirements.txt index 298847ea..d47ff23d 100644 --- a/samples/to_dataframe/requirements.txt +++ b/samples/to_dataframe/requirements.txt @@ -1,4 +1,4 @@ -google-auth==2.0.1 +google-auth==2.0.2 google-cloud-bigquery-storage==2.6.3 google-cloud-bigquery==2.24.1 pyarrow==5.0.0 From f635b55e66c37a73cfdd36b9e6cea7a9c5e9caf4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 15:44:22 +0000 Subject: [PATCH 14/17] chore(python): group renovate prs (#290) --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b75186cf..ef3cb34f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:d6761eec279244e57fe9d21f8343381a01d3632c034811a72f68b83119e58c69 + digest: sha256:1456ea2b3b523ccff5e13030acef56d1de28f21249c62aa0f196265880338fa7 diff --git a/renovate.json b/renovate.json index 9fa8816f..c21036d3 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,7 @@ { "extends": [ "config:base", + "group:all", ":preserveSemverRanges", ":disableDependencyDashboard" ], From 54cf722ae7e1ac27deaeb374dd69182465e566ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 23:02:15 +0200 Subject: [PATCH 15/17] chore(deps): update dependency pytest to v6.2.5 (#288) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pytest](https://docs.pytest.org/en/latest/) ([source](https://togithub.com/pytest-dev/pytest), [changelog](https://docs.pytest.org/en/stable/changelog.html)) | `==6.2.4` -> `==6.2.5` | [![age](https://badges.renovateapi.com/packages/pypi/pytest/6.2.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/pytest/6.2.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/pytest/6.2.5/compatibility-slim/6.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/pytest/6.2.5/confidence-slim/6.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
pytest-dev/pytest ### [`v6.2.5`](https://togithub.com/pytest-dev/pytest/releases/6.2.5) [Compare Source](https://togithub.com/pytest-dev/pytest/compare/6.2.4...6.2.5) # pytest 6.2.5 (2021-08-29) ## Trivial/Internal Changes - [#​8494](https://togithub.com/pytest-dev/pytest/issues/8494): Python 3.10 is now supported. - [#​9040](https://togithub.com/pytest-dev/pytest/issues/9040): Enable compatibility with `pluggy 1.0` or later.
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-bigquery-storage). --- samples/quickstart/requirements-test.txt | 2 +- samples/to_dataframe/requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/quickstart/requirements-test.txt b/samples/quickstart/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/quickstart/requirements-test.txt +++ b/samples/quickstart/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 diff --git a/samples/to_dataframe/requirements-test.txt b/samples/to_dataframe/requirements-test.txt index 95ea1e6a..92709451 100644 --- a/samples/to_dataframe/requirements-test.txt +++ b/samples/to_dataframe/requirements-test.txt @@ -1 +1 @@ -pytest==6.2.4 +pytest==6.2.5 From 43e36a13ece8d876763d88bad0252a1b2421c52a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 00:32:12 +0000 Subject: [PATCH 16/17] feat(v1beta2): Align ReadRows timeout with other versions of the API (#293) - [ ] Regenerate this pull request now. Committer: @emkornfield PiperOrigin-RevId: 394308710 Source-Link: https://github.com/googleapis/googleapis/commit/1549a69af196ca062870211083f2856b0870d45c Source-Link: https://github.com/googleapis/googleapis-gen/commit/40b5e7dd36d0b4a67f4cb41ad2e2f670700404ca docs(v1beta2): Align session length with public documentation --- .../services/big_query_read/async_client.py | 2 +- .../services/big_query_read/client.py | 2 +- .../services/big_query_read/transports/grpc.py | 2 +- .../services/big_query_read/transports/grpc_asyncio.py | 2 +- .../services/big_query_write/async_client.py | 4 ++-- .../services/big_query_write/transports/base.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py index b8fc974a..9a91feae 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/async_client.py @@ -199,7 +199,7 @@ async def create_read_session( number of pre-filtered rows, so some filters can lead to lopsided assignments. - Read sessions automatically expire 24 hours after they + Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller. diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py index f1838685..35675b84 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py @@ -420,7 +420,7 @@ def create_read_session( number of pre-filtered rows, so some filters can lead to lopsided assignments. - Read sessions automatically expire 24 hours after they + Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller. diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py index 54f5fed1..42f4e733 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py @@ -255,7 +255,7 @@ def create_read_session( number of pre-filtered rows, so some filters can lead to lopsided assignments. - Read sessions automatically expire 24 hours after they + Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller. diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py index 7cb0784f..2b7433a3 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py @@ -258,7 +258,7 @@ def create_read_session( number of pre-filtered rows, so some filters can lead to lopsided assignments. - Read sessions automatically expire 24 hours after they + Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller. diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py index 497182fb..9c6ba354 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py @@ -331,9 +331,9 @@ def append_rows( core_exceptions.ResourceExhausted, core_exceptions.ServiceUnavailable, ), - deadline=None, + deadline=86400.0, ), - default_timeout=None, + default_timeout=86400.0, client_info=DEFAULT_CLIENT_INFO, ) diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py index 7286ce5b..78571ced 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py @@ -185,9 +185,9 @@ def _prep_wrapped_messages(self, client_info): core_exceptions.ResourceExhausted, core_exceptions.ServiceUnavailable, ), - deadline=None, + deadline=86400.0, ), - default_timeout=None, + default_timeout=86400.0, client_info=client_info, ), self.get_write_stream: gapic_v1.method.wrap_method( From 0bd8279d28d7ec12adbef89794e1c4ca12d3df5d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 09:16:26 +0000 Subject: [PATCH 17/17] chore: release 2.7.0 (#294) :robot: I have created a release \*beep\* \*boop\* --- ## [2.7.0](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.6.3...v2.7.0) (2021-09-02) ### Features * **v1beta2:** Align ReadRows timeout with other versions of the API ([#293](https://www.github.com/googleapis/python-bigquery-storage/issues/293)) ([43e36a1](https://www.github.com/googleapis/python-bigquery-storage/commit/43e36a13ece8d876763d88bad0252a1b2421c52a)) ### Documentation * **v1beta2:** Align session length with public documentation ([43e36a1](https://www.github.com/googleapis/python-bigquery-storage/commit/43e36a13ece8d876763d88bad0252a1b2421c52a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07971c0e..477b755b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://pypi.org/project/google-cloud-bigquery-storage/#history +## [2.7.0](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.6.3...v2.7.0) (2021-09-02) + + +### Features + +* **v1beta2:** Align ReadRows timeout with other versions of the API ([#293](https://www.github.com/googleapis/python-bigquery-storage/issues/293)) ([43e36a1](https://www.github.com/googleapis/python-bigquery-storage/commit/43e36a13ece8d876763d88bad0252a1b2421c52a)) + + +### Documentation + +* **v1beta2:** Align session length with public documentation ([43e36a1](https://www.github.com/googleapis/python-bigquery-storage/commit/43e36a13ece8d876763d88bad0252a1b2421c52a)) + ### [2.6.3](https://www.github.com/googleapis/python-bigquery-storage/compare/v2.6.2...v2.6.3) (2021-08-06) diff --git a/setup.py b/setup.py index 6c34f388..9775f76f 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-bigquery-storage" description = "BigQuery Storage API API client library" -version = "2.6.3" +version = "2.7.0" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ # NOTE: Maintainers, please do not require google-api-core>=2.x.x