Skip to content

chore: replace api_name with updated method_logger #1660

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Genesis929
Copy link
Collaborator

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

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Apr 25, 2025
@Genesis929 Genesis929 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 28, 2025
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 28, 2025
@Genesis929 Genesis929 marked this pull request as ready for review April 28, 2025 20:53
@Genesis929 Genesis929 requested review from a team as code owners April 28, 2025 20:53
@Genesis929 Genesis929 requested a review from tswast April 28, 2025 20:53
@Genesis929 Genesis929 requested a review from shobsi April 28, 2025 20:56
@GarrettWu GarrettWu removed their assignment Apr 29, 2025
@tswast
Copy link
Collaborator

tswast commented May 1, 2025

@Genesis929 It looks like there are some conflicts to resolve before this can be fully reviewed.

api_methods = log_adapter.get_and_reset_api_methods()
assert "testclass-my_field" in api_methods

assert "<locals>-method1" in api_methods
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these characters allowed?

Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.

https://cloud.google.com/bigquery/docs/labels-intro#requirements

I think we need some logic to remove invalid characters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These characters should only exist in tests, unless someone uses them in a similar way. Updated in case someone actually uses them this way.

@@ -213,12 +224,24 @@ def wrapped(*args, **kwargs):
)


def log_name_override(name: str):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a decorator for cases where the logged method name is not the same as the real method name. This is for _read_gbq_colab.

@Genesis929 Genesis929 requested a review from tswast May 12, 2025 19:50
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: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants