Skip to content

chore(migration): Migrate code from googleapis/gapic-generator-python into packages/gapic-generator#16107

Draft
chalmerlowe wants to merge 1390 commits intomainfrom
migration.gapic-generator-python.migration.2026-03-13_17-11-18.migrate
Draft

chore(migration): Migrate code from googleapis/gapic-generator-python into packages/gapic-generator#16107
chalmerlowe wants to merge 1390 commits intomainfrom
migration.gapic-generator-python.migration.2026-03-13_17-11-18.migrate

Conversation

@chalmerlowe
Copy link
Contributor

@chalmerlowe chalmerlowe commented Mar 13, 2026

Caution

DO NOT MERGE. This is a practice PR.

See #14907.

This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.

release-please bot and others added 30 commits April 26, 2024 12:30
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
ohmayr and others added 27 commits February 5, 2026 14:02
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…n/main' into migration.gapic-generator-python.migration.2026-03-13_17-11-18.migrate
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 undertakes a significant architectural change by migrating the gapic-generator-python project into a new packages/gapic-generator directory within the repository. This move aims to consolidate the codebase and streamline its management. Beyond the structural relocation, the PR introduces new features such as a specialized ads-templates set for targeted code generation and a configurable snippet generation system to enhance sample code creation. The update also includes a complete set of standardized development and build configurations, along with comprehensive project documentation, ensuring a robust and well-supported environment for future development.

Highlights

  • Project Relocation: The entire gapic-generator-python codebase has been migrated to packages/gapic-generator, signifying a major monorepo restructuring.
  • Introduction of ads-templates: A new set of Jinja2 templates, gapic/ads-templates/, has been added, suggesting specialized generation capabilities for certain APIs.
  • Configurable Snippet Generation Feature: New modules for configurable snippet generation (gapic/configurable_snippetgen/) are introduced, enabling more flexible and structured sample code creation.
  • Standardized Development Environment: Comprehensive configuration files for Bazel, code coverage, Docker, linting, and Git hooks are now in place, promoting a consistent development workflow.
  • Updated Project Documentation: Extensive project documentation, including README.rst, CONTRIBUTING.md, DEVELOPMENT.md, and Sphinx documentation, has been added to the new location.
Changelog
  • packages/gapic-generator/.bazeliskrc
    • Added Bazelisk configuration to specify Bazel version 6.5.0.
  • packages/gapic-generator/.bazelrc
    • Added Bazel configuration to require C++17 for new protobuf.
  • packages/gapic-generator/.coveragerc
    • Added coverage configuration, including branch coverage and omission rules for generated files.
  • packages/gapic-generator/.dockerignore
    • Added Docker ignore rules for version control, Python scaffolding, build artifacts, and IDE files.
  • packages/gapic-generator/.flake8
    • Added Flake8 configuration with ignored error codes and excluded directories for generated code.
  • packages/gapic-generator/.githooks/pre-commit
    • Added a pre-commit Git hook script for running unit and integration tests, and fixing Bazel format.
  • packages/gapic-generator/.gitignore
    • Added Git ignore rules for various build artifacts, caches, and environment files.
  • packages/gapic-generator/.librarian/state.yaml
    • Added Librarian state configuration for gapic-generator version 1.30.13.
  • packages/gapic-generator/.readthedocs.yml
    • Added ReadTheDocs configuration for building documentation with Python 3.7.
  • packages/gapic-generator/.repo-metadata.json
    • Added repository metadata for the gapic-generator project.
  • packages/gapic-generator/BUILD.bazel
    • Added Bazel build rules for pandoc toolchains and the gapic_plugin Python binary.
  • packages/gapic-generator/CODE_OF_CONDUCT.md
    • Added the Contributor Code of Conduct.
  • packages/gapic-generator/CONTRIBUTING.md
    • Added contribution guidelines, including CLA and code review process.
  • packages/gapic-generator/DEVELOPMENT.md
    • Added development setup, unit test, formatting, and integration test instructions.
  • packages/gapic-generator/LICENSE
    • Added the Apache License, Version 2.0.
  • packages/gapic-generator/MANIFEST.in
    • Added manifest file for package distribution, including Python files and templates.
  • packages/gapic-generator/README.rst
    • Added the main README file with information about the API Client Generator for Python, Bazel usage, and development links.
  • packages/gapic-generator/SECURITY.md
    • Added security policy with instructions for reporting vulnerabilities.
  • packages/gapic-generator/WORKSPACE
    • Added Bazel workspace definition with external dependencies for rules_python, grpc, and protobuf.
  • packages/gapic-generator/docs/Makefile
    • Added Makefile for Sphinx documentation.
  • packages/gapic-generator/docs/conf.py
    • Added Sphinx configuration file for documentation build.
  • packages/gapic-generator/docs/getting-started/_example.rst
    • Added example usage for an existing API.
  • packages/gapic-generator/docs/getting-started/_samplegen.rst
    • Added documentation for generating samples.
  • packages/gapic-generator/docs/getting-started/_usage_intro.rst
    • Added usage introduction for the plugin.
  • packages/gapic-generator/docs/getting-started/_verifying.rst
    • Added instructions for verifying the generated library.
  • packages/gapic-generator/docs/getting-started/bazel.rst
    • Added documentation for Bazel build setup and usage.
  • packages/gapic-generator/docs/getting-started/index.rst
    • Added getting started guide for the code generator.
  • packages/gapic-generator/docs/getting-started/local.rst
    • Added local installation instructions for protoc, pandoc, and the API Generator for Python.
  • packages/gapic-generator/docs/index.rst
    • Added main documentation index for the API Client Generator for Python.
  • packages/gapic-generator/docs/process.rst
    • Added documentation explaining how code generation works, including parsing and translation steps.
  • packages/gapic-generator/docs/reference/generator.rst
    • Added reference documentation for the gapic.generator module.
  • packages/gapic-generator/docs/reference/index.rst
    • Added reference documentation index for major classes and functions.
  • packages/gapic-generator/docs/reference/schema.rst
    • Added reference documentation for the gapic.schema module.
  • packages/gapic-generator/docs/reference/utils.rst
    • Added reference documentation for the gapic.utils module.
  • packages/gapic-generator/docs/status.rst
    • Added documentation outlining features and limitations of the generator.
  • packages/gapic-generator/docs/templates.rst
    • Added documentation describing how to write and use Jinja2 templates for code generation.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/init.py.j2
    • Added Jinja2 template for __init__.py for ads-templates, defining __all__ for subpackages, services, messages, and enums.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/gapic_version.py.j2
    • Added Jinja2 template for gapic_version.py for ads-templates, setting __version__.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/init.py.j2
    • Added Jinja2 template for service __init__.py for ads-templates, importing client classes.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_mixins.py.j2
    • Added Jinja2 template for service mixins for ads-templates, including LRO, IAM, and Location mixin methods.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_shared_macros.j2
    • Added Jinja2 template for shared macros for ads-templates, including UUID4 field population, API version headers, metadata creation, and REST call methods.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/client.py.j2
    • Added Jinja2 template for service client for ads-templates, including client initialization, resource path methods, and RPC method definitions.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/pagers.py.j2
    • Added Jinja2 template for service pagers for ads-templates, defining pager classes for paginated RPC methods.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/init.py.j2
    • Added Jinja2 template for service transports __init__.py for ads-templates, compiling a registry of transports.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/_mixins.py.j2
    • Added Jinja2 template for gRPC transport mixins for ads-templates, including LRO, IAM, and Location mixin properties.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/_rest_mixins.py.j2
    • Added Jinja2 template for REST transport mixins for ads-templates, generating mixin call methods.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/_rest_mixins_base.py.j2
    • Added Jinja2 template for base REST transport mixins for ads-templates, defining base classes for REST methods.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2
    • Added Jinja2 template for base transport class for ads-templates, defining abstract methods and common initialization.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/grpc.py.j2
    • Added Jinja2 template for gRPC transport for ads-templates, implementing gRPC backend for services.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2
    • Added Jinja2 template for REST transport for ads-templates, implementing REST backend for services.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest_base.py.j2
    • Added Jinja2 template for base REST transport for ads-templates, defining common REST transport logic.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/services/init.py.j2
    • Added empty Jinja2 template for services __init__.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/types/%proto.py.j2
    • Added Jinja2 template for proto types for ads-templates, defining protobuf messages and enums.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/types/init.py.j2
    • Added empty Jinja2 template for types __init__.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/types/_enum.py.j2
    • Added Jinja2 template for enum definitions for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/%sub/types/_message.py.j2
    • Added Jinja2 template for message definitions for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/init.py.j2
    • Added Jinja2 template for versioned __init__.py for ads-templates, handling lazy imports and version checks.
  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/py.typed.j2
    • Added Jinja2 template for py.typed marker file for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/.coveragerc.j2
    • Added Jinja2 template for coverage configuration for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/MANIFEST.in.j2
    • Added Jinja2 template for MANIFEST.in for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/_base.py.j2
    • Added Jinja2 base template for Python files for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/_license.j2
    • Added Jinja2 template for Apache license header for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/%name_%version/services.rst.j2
    • Added Jinja2 template for Sphinx services documentation for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/%name_%version/types.rst.j2
    • Added Jinja2 template for Sphinx types documentation for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/_static/custom.css.j2
    • Added Jinja2 template for custom CSS for Sphinx documentation for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/common_setup.py.j2
    • Added Jinja2 template for common Sphinx setup functions for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/conf.py.j2
    • Added Jinja2 template for Sphinx configuration file for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/docs/index.rst.j2
    • Added Jinja2 template for Sphinx API reference index for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/examples/feature_fragments.j2
    • Added Jinja2 template for example feature fragments for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/examples/sample.py.j2
    • Added Jinja2 template for example sample Python file for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/mypy.ini.j2
    • Added Jinja2 template for mypy configuration for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/noxfile.py.j2
    • Added Jinja2 template for nox configuration for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/setup.py.j2
    • Added Jinja2 template for setup.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/init.py.j2
    • Added empty Jinja2 template for tests __init__.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/unit/init.py.j2
    • Added empty Jinja2 template for unit tests __init__.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/init.py.j2
    • Added empty Jinja2 template for versioned gapic unit tests __init__.py for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/_test_mixins.py.j2
    • Added Jinja2 template for unit tests of mixin methods for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/unit/gapic/%name_%version/test_module_import.py.j2
    • Added Jinja2 template for module import unit tests for ads-templates.
  • packages/gapic-generator/gapic/ads-templates/tests/unit/gapic/init.py.j2
    • Added empty Jinja2 template for gapic unit tests __init__.py for ads-templates.
  • packages/gapic-generator/gapic/cli/init.py
    • Added __init__.py for the gapic.cli module.
  • packages/gapic-generator/gapic/cli/dump.py
    • Added script to dump CodeGeneratorRequest for debugging.
  • packages/gapic-generator/gapic/cli/generate.py
    • Added main script for generating API client descriptions from CodeGeneratorRequest.
  • packages/gapic-generator/gapic/cli/generate_with_pandoc.py
    • Added script to generate API clients using pandoc for documentation processing.
  • packages/gapic-generator/gapic/configurable_snippetgen/init.py
    • Added __init__.py for the gapic.configurable_snippetgen module.
  • packages/gapic-generator/gapic/configurable_snippetgen/configured_snippet.py
    • Added module for generating configured code snippets using libcst.
  • packages/gapic-generator/gapic/configurable_snippetgen/libcst_utils.py
    • Added utility functions for libcst manipulation in snippet generation.
  • packages/gapic-generator/gapic/configurable_snippetgen/snippet_config_language.proto
    • Added protobuf definition for the snippet configuration language.
  • packages/gapic-generator/gapic/configurable_snippetgen/snippet_config_language_pb2.py
    • Added generated Python protobuf code for the snippet configuration language.
  • packages/gapic-generator/gapic/generator/init.py
    • Added __init__.py for the gapic.generator module.
  • packages/gapic-generator/gapic/generator/formatter.py
    • Added module for whitespace formatting of generated code.
  • packages/gapic-generator/gapic/generator/generator.py
    • Added core generator logic for rendering templates and creating CodeGeneratorResponse.
  • packages/gapic-generator/gapic/samplegen/init.py
    • Added __init__.py for the gapic.samplegen module.
  • packages/gapic-generator/gapic/samplegen/manifest.py
    • Added module for generating samplegen manifests.
  • packages/gapic-generator/gapic/samplegen/samplegen.py
    • Added module for generating standalone, runnable samples.
  • packages/gapic-generator/gapic/samplegen_utils/init.py
    • Added __init__.py for the gapic.samplegen_utils module.
  • packages/gapic-generator/gapic/samplegen_utils/snippet_index.py
    • Added module for indexing and managing snippets and their metadata.
  • packages/gapic-generator/gapic/samplegen_utils/snippet_metadata.proto
    • Added protobuf definition for snippet metadata.
  • packages/gapic-generator/gapic/samplegen_utils/snippet_metadata_pb2.py
    • Added generated Python protobuf code for snippet metadata.
  • packages/gapic-generator/gapic/samplegen_utils/types.py
    • Added module defining custom exception types for sample generation.
  • packages/gapic-generator/gapic/samplegen_utils/utils.py
    • Added utility functions for sample generation, including YAML parsing and format string rendering.
  • packages/gapic-generator/gapic/samplegen_utils/yaml.py
    • Added module for simplified YAML rendering.
  • packages/gapic-generator/gapic/schema/init.py
    • Added __init__.py for the gapic.schema module.
  • packages/gapic-generator/gapic/schema/api.py
    • Added module defining the API class for representing a full API schema.
  • packages/gapic-generator/gapic/schema/imp.py
    • Added module defining the Import class for Python import statements.
  • packages/gapic-generator/gapic/schema/metadata.py
    • Added module defining Address and Metadata classes for tracking descriptor origins and documentation.
  • packages/gapic-generator/gapic/schema/mixins.py
    • Added module defining mixin method information.
  • packages/gapic-generator/gapic/schema/naming.py
    • Added module defining the Naming class for API naming conventions.
  • packages/gapic-generator/gapic/schema/wrappers.py
    • Added module defining wrapper classes for protobuf descriptors, including Field, MessageType, EnumType, Method, and Service.
  • packages/gapic-generator/gapic/templates/%namespace/%name/init.py.j2
    • Added Jinja2 template for __init__.py for standard templates, handling imports and versioning.
  • packages/gapic-generator/gapic/templates/%namespace/%name/gapic_version.py.j2
    • Added Jinja2 template for gapic_version.py for standard templates, setting __version__.
  • packages/gapic-generator/gapic/templates/%namespace/%name/py.typed.j2
    • Added Jinja2 template for py.typed marker file for standard templates.
  • packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/init.py.j2
    • Added Jinja2 template for versioned __init__.py for standard templates, including Python version and dependency checks.
  • packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/init.py.j2
    • Added Jinja2 template for service __init__.py for standard templates, importing client classes.
  • packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/_async_mixins.py.j2
    • Added Jinja2 template for async service mixins for standard templates, including LRO, IAM, and Location mixin methods.
  • packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2
    • Added Jinja2 template for client macros for standard templates, defining client method generation and extended operation service setup.
Activity
  • The pull request is a migration of the gapic-generator-python codebase into a new monorepo structure under packages/gapic-generator.
  • The author explicitly requested a merge-commit to preserve git history, as indicated in the PR description.
  • The PR description references issue Adopt split repo: _gapic-generator-python_ #14907, suggesting this migration is part of a larger planned effort.
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
Contributor

@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 new configuration files and updates existing ones across various aspects of the Python GAPIC generator project. Key changes include setting Bazel version to 6.5.0, enabling C++17 for protobuf, configuring coverage reporting, and defining new .dockerignore and .gitignore rules. A pre-commit hook is added for unit/integration tests and Bazel formatting. GitHub configurations like CODEOWNERS, issue/PR templates, auto-labeling, and CI workflows (tests.yaml) are established. Documentation files (.readthedocs.yml, README.rst, docs/*) are added or updated, along with Kokoro CI configurations. The core BUILD.bazel file is updated to include pandoc toolchains and Python runtime definitions. Several Jinja templates (gapic/ads-templates/*) are added or modified to support new generation logic, including handling mixins, pagers, and client/transport classes. Review comments highlight critical issues such as invalid actions/setup-python version in CI, an incorrect protobuf version in WORKSPACE, a misleading Bazel cache directory name, an incorrect path for golden files in the pre-commit hook, outdated Python version for documentation builds, incorrect code block language in README.rst, outdated Python version and legacy command substitution in _verifying.rst, an outdated Bazel version in bazel.rst, a reStructuredText syntax error in bazel.rst, inconsistent Python version requirements in documentation, and dead code related to Python version checks in __init__.py.j2.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/gapic-generator/.github/workflows/tests.yaml (64)

critical

The version v6 for actions/setup-python is invalid; the latest stable version is v5. Using a non-existent version will cause this workflow to fail. Please update this and all other occurrences in this file to use a valid version, such as v5.

        uses: actions/setup-python@v5

packages/gapic-generator/WORKSPACE (75)

critical

The protobuf version 30.2 is invalid and will cause the build to fail. Based on the provided SHA256 hash, the correct version appears to be 25.2. Please update the version to ensure the dependency can be downloaded successfully.

_protobuf_version = "25.2"

packages/gapic-generator/.githooks/pre-commit (71)

medium

The Bazel cache directory name includes _java, which seems to be a copy-paste error from another project since this is for the Python generator. This could be confusing for developers. I recommend renaming it to reflect the correct project.

BAZEL_CACHE_DIR=/tmp/bazel_cache_gapic_generator_python

packages/gapic-generator/.githooks/pre-commit (80)

medium

The path src/test/*/*.golden used to detect changes in unit test golden files seems to be a leftover from a Java project structure. For this Python project, unit test golden files are likely located elsewhere. Please update this path to correctly point to the Python unit test golden files to ensure the pre-commit hook triggers correctly.

packages/gapic-generator/.readthedocs.yml (6)

medium

The Python version for building documentation is set to 3.7, which is outdated and inconsistent with the CI workflow (tests.yaml) that specifies version 3.10 for documentation jobs. To ensure consistency and avoid potential build issues with newer language features, please update this to 3.10.

  version: "3.10"

packages/gapic-generator/README.rst (40)

medium

The code block is marked as c, but the content is Starlark (Bazel's language). This is misleading. I recommend changing it to python or simply code-block:: for better clarity. This applies to other similar blocks in this file.

.. code-block:: python

packages/gapic-generator/docs/getting-started/_verifying.rst (11)

medium

The Python version 3.7 is outdated for this project, which requires Python 3.9+. Additionally, using backticks for command substitution is a legacy practice. I recommend updating the version to 3.9 and using $(...) for command substitution for better compatibility and modern shell scripting standards.

  $ virtualenv ~/.local/client-lib --python=$(which python3.9)

packages/gapic-generator/docs/getting-started/bazel.rst (24-25)

medium

The documentation suggests using Bazel version 3.2.0, which is quite old. The project's .bazeliskrc file specifies version 6.5.0. To avoid confusion and ensure users have a working setup, the documentation should be updated to reflect the version used by the project.

    curl -L https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64 -o bazel
    chmod +x bazel

packages/gapic-generator/docs/getting-started/bazel.rst (65)

medium

There is a syntax error in this reStructuredText directive. The .. before the URL will cause a rendering error. Please remove the extra . to fix the link.

.. _Document AI: https://cloud.google.com/solutions/document-ai

packages/gapic-generator/docs/status.rst (14)

medium

The documentation states that the output works on Python 3.5 and above, but other parts of the repository, such as setup.py.j2, specify a requirement of Python 3.9+. This inconsistency should be corrected to reflect the actual minimum supported version.

- The output only works on Python 3.9 and above.

packages/gapic-generator/gapic/templates/%namespace/%name_%version/%sub/init.py.j2 (68-82)

medium

This block of code checks for Python versions less than 3.9 and issues a warning. However, the setup.py.j2 file specifies python_requires=">=3.9", which means this code will never be executed. This dead code should be removed to clean up the template.

@chalmerlowe chalmerlowe added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.