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

refactor: move query and wait logic to separate module #720

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Jan 9, 2024

This prepares the way for using the query_and_wait method built-in to the client library when available.

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 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)

Towards #710
🦕

This prepares the way for using the `query_and_wait` method built-in to the
client library when available.
@tswast tswast requested review from a team as code owners January 9, 2024 17:16
@tswast tswast requested review from mrfaizal and Linchin January 9, 2024 17:16
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-pandas API. labels Jan 9, 2024
@tswast
Copy link
Collaborator Author

tswast commented Jan 9, 2024

Conda test failure appears unrelated and tracked here: #708

BigQuery configuration.
"""

pass
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we keep the pass here? Other error classes do not have this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're correct. pass is not needed because there is a docstring. I'll remove.

):
"""Wait for query to complete, pausing occasionally to update progress.

Args:
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this method has been moved out to be a helper function, maybe we should also update the description as the parameters have changed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated docstrings here and added docstrings to the query_and_wait() method.

Copy link
Contributor

@Linchin Linchin left a comment

Choose a reason for hiding this comment

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

Thank you @tswast! All looks good except for some small comments.

@tswast tswast added the automerge Merge the pull request once unit tests and other checks pass. label Jan 16, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit e1c384e into main Jan 16, 2024
27 of 28 checks passed
@gcf-merge-on-green gcf-merge-on-green bot deleted the issue710-query_and_wait branch January 16, 2024 19:52
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 16, 2024
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-pandas API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants