Skip to content

Conversation

@ohmayr
Copy link
Contributor

@ohmayr ohmayr commented Dec 4, 2025

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

@gemini-code-assist
Copy link

Summary of Changes

Hello @ohmayr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the google-cloud-discoveryengine client library by integrating a new performance logging system, allowing developers to easily track function execution times. It also includes a significant version update for the library and widespread code formatting changes, likely a result of applying automated linting rules. A new client generation configuration file has been added to streamline future development.

Highlights

  • Performance Logging: Introduced a new performance logging mechanism that can be enabled via the ENABLE_PERF_LOGS environment variable. This includes a track_time decorator to measure function execution durations.
  • Client Library Version Update: The google-cloud-discoveryengine client library version has been updated from 0.15.0 to 0.4.0 across its main and v1 sub-packages.
  • Code Formatting and Import Refactoring: Numerous Python client files have undergone import statement reordering and minor formatting adjustments, likely due to the application of a linter like ruff.
  • Client Generation Configuration: A new generate-request.json file has been added, detailing the configuration for generating the google-cloud-discoveryengine client, including API versions and file handling rules.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces performance logging capabilities through a track_time decorator, which can be enabled via an environment variable. This is a valuable addition for performance analysis. The implementation is sound, though I have a couple of minor suggestions to improve the code style in .generator/cli.py. The pull request also includes extensive formatting changes across many files, likely from an automated tool like ruff, which improves code consistency and is a welcome change.


logging.basicConfig(stream=sys.stdout, level=logging.INFO)

import functools

Choose a reason for hiding this comment

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

medium

Per PEP 8, imports should be grouped at the top of the file. Please move import functools to the import block at the beginning of the file.

finally:
duration = time.perf_counter() - start_time
perf_logger.info(f"{func.__name__:<30} | {duration:.4f} seconds")

Choose a reason for hiding this comment

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

medium

This line appears to be an unnecessary blank line with trailing whitespace. Please remove it to improve code cleanliness.

@ohmayr ohmayr closed this Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant