-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: librarian onboard pull request: 20260121T103103Z #15473
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @chalmerlowe, 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 integrates the new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 onboards the new google-cloud-apiregistry client library. The changes are mostly boilerplate and configuration files. My review has identified several issues, primarily related to incorrect dependency versioning in setup.py and testing constraints, which are critical and will cause installation or testing failures. I've also found an incorrect Python version support warning in the generated code and a missing API description in the repository metadata. I have provided suggestions to fix these issues.
| # See https://github.com/googleapis/google-cloud-python/issues/12364 | ||
| "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | ||
| "grpcio >= 1.33.2, < 2.0.0", | ||
| "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "grpcio >= 1.33.2, < 2.0.0", | ||
| "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", | ||
| "proto-plus >= 1.22.3, <2.0.0", | ||
| "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if sys.version_info < (3, 9): | ||
| warnings.warn( | ||
| "You are using a non-supported Python version " | ||
| + f"({_py_version_str}). Google will not post any further " | ||
| + f"updates to {_package_label} supporting this Python version. " | ||
| + "Please upgrade to the latest Python version, or at " | ||
| + f"least to Python 3.9, and then update {_package_label}.", | ||
| FutureWarning, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python version check if sys.version_info < (3, 9): incorrectly flags Python 3.7 and 3.8 as "non-supported", even though they are listed as supported versions for this package. This will cause confusing warnings for users on these versions. This check should probably target only versions that are actually no longer supported by the package or are EOL. For example, Python 3.7 is EOL. A check for < (3, 8) with an appropriate message would be more accurate.
if sys.version_info < (3, 8):
warnings.warn(
f"You are using Python {_py_version_str} which is an EOL version. "
+ f"Google will not post any further updates to {_package_label} "
+ "supporting this Python version. "
+ "Please upgrade to a supported Python version.",
FutureWarning,
)| google-auth>=2 | ||
| grpcio>=1 | ||
| proto-plus>=1 | ||
| protobuf>=6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constraint protobuf>=6 is incorrect as there is no version 6.x of protobuf. This will cause testing sessions that use this constraints file to fail. Please correct this to a valid version constraint, for example protobuf>=5 if that's the intent, to test against the latest major versions.
protobuf>=5
| google-auth>=2 | ||
| grpcio>=1 | ||
| proto-plus>=1 | ||
| protobuf>=6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constraint protobuf>=6 is incorrect as there is no version 6.x of protobuf. This will cause testing sessions that use this constraints file to fail. Please correct this to a valid version constraint, for example protobuf>=5 if that's the intent, to test against the latest major versions.
protobuf>=5
| { | ||
| "name": "google-cloud-apiregistry", | ||
| "name_pretty": "Cloud API Registry API", | ||
| "api_description": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The api_description field is empty. It's recommended to provide a concise description of the API. Based on the product documentation, a good description would be: "The API Registry provides a single place to discover and manage all of your APIs across your organization.".
| "api_description": "", | |
| "api_description": "The API Registry provides a single place to discover and manage all of your APIs across your organization.", |
| _next_supported_version = "4.25.8" | ||
| _next_supported_version_tuple = (4, 25, 8) | ||
| _recommendation = " (we recommend 6.x)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The protobuf version check has a couple of issues:
- The version
_next_supported_version = "4.25.8"does not exist. The latest version in the 4.x series is 4.25.3. This should be corrected to a valid version. - The recommendation
_recommendation = " (we recommend 6.x)"is confusing as there is no protobuf 6.x version. This should be removed or changed to recommend a valid version range, for example, "we recommend the latest 4.x version".
_next_supported_version = "4.25.3"
_next_supported_version_tuple = (4, 25, 3)
_recommendation = " (we recommend the latest 4.x version)"
packages/google-cloud-apiregistry/google/cloud/apiregistry_v1beta/types/resources.py
Outdated
Show resolved
Hide resolved
Testing a potential fix, adds a single blank line at the end of this list.
Removes double spaces before each list bullet.
Adds hanging indent and blank line after all the list elements as well as cleaned up some triple spaces in the text.
packages/google-cloud-apiregistry/google/cloud/apiregistry_v1beta/types/resources.py
Outdated
Show resolved
Hide resolved
Removes hidden whitespace for linting.
testing whether adding cryptography impacts prerelease tests.
…t the warning filter. This reverts commit 22b87b6.
PR created by the Librarian CLI to onboard a new Cloud Client Library.
BEGIN_COMMIT
feat: onboard a new library
PiperOrigin-RevId: 848064295
Library-IDs: google-cloud-apiregistry
END_COMMIT
Librarian Version: v0.7.0
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209