Skip to content

refactor: reorganize remote_function code for readability #885

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

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

shobsi
Copy link
Contributor

@shobsi shobsi commented Aug 6, 2024

Currently the user facing functions remote_function and read_gbq_function have entry points through the Session class and bigframes.pandas module. Most of the underlying code currently exists in bigframes.functions.remote_function which has grown large. This module is not promoted to be used by the end user directly, and is not included in the public documentation. This refactoring involves following changes to the code in this module:

  1. Move RemoteFunctionClient to a separate module remote_function_client
  2. Rename _RemoteFunctionSession class to RemoteFunctionSession and move to a separate module remote_function_session
  3. Moved a bunch of module level functions to utils module

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)

Fixes #<issue_number_goes_here> 🦕

@shobsi shobsi requested review from a team as code owners August 6, 2024 05:23
@shobsi shobsi requested a review from mattyopl August 6, 2024 05:23
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Aug 6, 2024
@shobsi shobsi requested a review from TrevorBergeron August 7, 2024 02:04
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Hard to fully review, but LGTM assuming this is a pure refactoring.

@shobsi
Copy link
Contributor Author

shobsi commented Aug 12, 2024

Hard to fully review, but LGTM assuming this is a pure refactoring.

Added some explanation in the description. Technically this refactoring could break someone using those internal purpose classes and methods directly. If that's a concern I can leave aliases in the previous module, but didn't so far to avoid unnecessary clutter.

@shobsi shobsi merged commit 991bb0a into main Aug 12, 2024
23 checks passed
@shobsi shobsi deleted the shobs-rf-refactor branch August 12, 2024 21:32
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-dataframes API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy