FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc(bigquery): uncomment `Client` constructor and imports in samples by tswast · Pull Request #10058 · googleapis/google-cloud-python · GitHub

doc(bigquery): uncomment Client constructor and imports in samples - #10058

Merged
tswast merged 3 commits into
googleapis:masterfrom
tswast:b144569827-uncomment-imports
Jan 3, 2020
Merged

doc(bigquery): uncomment Client constructor and imports in samples#10058
tswast merged 3 commits into
googleapis:masterfrom
tswast:b144569827-uncomment-imports

Conversation

tswast commented Jan 3, 2020

Copy link
Copy Markdown
Contributor

Use a session-scope filter to ensure that a client is only constructed once per test run, saving time on authentication.

We received customer feedback (internal issue 144569827) pointing out that the Client constructor and from google.cloud import bigquery lines shouldn't be commented-out. Leaving these uncommented also better matches the latest code sample best practices. To ensure this is net-neutral in terms of test time, I update the client fixture to ensure that bigquery.Client() in the code samples doesn't redo the slow authentication logic.

Use a session-scope filter to ensure that a client is only constructed once per test run, saving time on authentication.
tswast requested a review from a team January 3, 2020 21:17
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 3, 2020
tswast requested review from leahecole and shollyman January 3, 2020 21:17

shollyman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good, but my mind may have been lulled into a sense of complacency by the repetition of the word "client" in the diffs. :)

tswast commented Jan 3, 2020

Copy link
Copy Markdown
Contributor Author

Thanks! Yeah, it's mostly a search-and-replace. Only manual changes were to conftest.py.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL