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

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

Merged
merged 3 commits into from
Jan 3, 2020

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Jan 3, 2020

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 tswast requested a review from a team January 3, 2020 21:17
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 3, 2020
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

tswast commented Jan 3, 2020

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

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