Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Prepare for 2.0 release #278

Merged
merged 22 commits into from
Sep 30, 2020
Merged

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Sep 25, 2020

This PR should serve as a preview of the 2.0 release.

For a start, the BQ Storage v1beta1 compatibility code is removed, as it will not be needed anymore once BQ Storage v2.0.0 is released.

TODO list:

  • Fix import paths in tests and samples that are affected by bigquery_v2 changes.
  • Describe bigquery_v2 changes in UPGRADING guide.
  • Fix docs, include bigquery_v2 in them, if necessary.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 25, 2020
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 26, 2020
@plamut plamut added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 29, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 29, 2020
@plamut
Copy link
Contributor Author

plamut commented Sep 29, 2020

BQ Storage 2.0.0 released, re-running.

setup.py Show resolved Hide resolved
UPGRADING.md Show resolved Hide resolved
docs/bigquery_v2/services.rst Show resolved Hide resolved
google/cloud/bigquery/dbapi/connection.py Show resolved Hide resolved
docs/bigquery_v2/types.rst Show resolved Hide resolved
google/cloud/bigquery/table.py Outdated Show resolved Hide resolved
google/cloud/bigquery_v2/services/__init__.py Outdated Show resolved Hide resolved
tests/unit/test_dbapi_connection.py Show resolved Hide resolved
@plamut
Copy link
Contributor Author

plamut commented Sep 30, 2020

FWIW, the snippets tests in samples/snippets fail because the generated noxfile tries to install BigQuery v1.x, but the snippets require v2.0.0 that is still in the making. They pass locally if INSTALL_LIBRARY_FROM_SOURCE env variable is set and the following patch is applied:

diff --git samples/snippets/noxfile.py samples/snippets/noxfile.py
index 5660f08..66589f5 100644
--- samples/snippets/noxfile.py
+++ samples/snippets/noxfile.py
@@ -158,14 +158,17 @@ def _session_tests(session, post_install=None):
         session.install("-r", "requirements-test.txt")
 
     if INSTALL_LIBRARY_FROM_SOURCE:
-        session.install("-e", _get_repo_root())
+        session.install("-e", _get_repo_root() + "[all]")
 
     if post_install:
         post_install(session)
 
diff --git samples/snippets/requirements.txt samples/snippets/requirements.txt
index 7fe8391..4753c47 100644
--- samples/snippets/requirements.txt
+++ samples/snippets/requirements.txt
@@ -1,4 +1,4 @@
-google-cloud-bigquery[pandas,bqstorage,pyarrow]==1.26.1
+# google-cloud-bigquery[pandas,bqstorage,pyarrow]==1.26.1
 google-auth-oauthlib==0.4.1
 ipython==7.16.1; python_version < '3.7'
 ipython==7.17.0; python_version >= '3.7'

@tswast
Copy link
Contributor

tswast commented Sep 30, 2020

They pass locally if INSTALL_LIBRARY_FROM_SOURCE env variable is set and the following patch is applied:

Do we need to add the necessary extras to requirements.txt?

The assertion seems to fail for a banal reason, i.e. an extra newline
in the string representation.
@tswast
Copy link
Contributor

tswast commented Sep 30, 2020

Since it looks like requirements.txt is used to install packages, even when INSTALL_LIBRARY_FROM_SOURCE is set, I'm a bit confused as to why pandas isn't getting installed.

session.install("-r", "requirements.txt")

Maybe I missed some logic that filters out google-cloud-bigquery[pandas,...] from that installation?

@plamut
Copy link
Contributor Author

plamut commented Sep 30, 2020

@tswast Ah, I think that's probably because I temporarily commented out the google-cloud-python line from requirements.txt completely, I just wanted to test with a local version of the library.

(and then had to adjust the installation from source line in noxfile to actually get all those extras installed)

@plamut plamut marked this pull request as ready for review September 30, 2020 17:36
@plamut plamut requested a review from a team September 30, 2020 17:36
@plamut plamut requested a review from a team as a code owner September 30, 2020 17:36
@plamut plamut requested a review from dinagraves September 30, 2020 17:36
There are currently no public API endpoints for the ModelServiceClient,
thus there is no point in generating that code in the first place.
testing/constraints-3.6.txt Show resolved Hide resolved
docs/bigquery_v2/services.rst Show resolved Hide resolved
docs/reference.rst Show resolved Hide resolved
@crwilcox
Copy link
Contributor

Hammer merging to work around sample tests.

@crwilcox crwilcox merged commit cbcb4b8 into googleapis:master Sep 30, 2020
@plamut
Copy link
Contributor Author

plamut commented Sep 30, 2020

@crwilcox Thanks!

Release PR (#284) will probably need the same hammer love.

@plamut plamut deleted the prepare-for-2-0 branch September 30, 2020 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants