-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(migration): Migrate code from googleapis/gapic-generator-python into packages/gapic-generator #16183
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
parthea
merged 1,413 commits into
main
from
migration.gapic-generator-python.migration.2026-03-26_09-14-27.migrate
Mar 26, 2026
Merged
chore(migration): Migrate code from googleapis/gapic-generator-python into packages/gapic-generator #16183
Changes from 250 commits
Commits
Show all changes
1413 commits
Select commit
Hold shift + click to select a range
a698598
fix: mypy types in get_transport (#2088)
daniel-sanche 87a806c
build: fix mypy (#2092)
parthea a4fcd75
chore(deps): update all dependencies (#2090)
renovate-bot cbcf1a7
chore(python): fix docs build (#2086)
gcf-owl-bot[bot] 4951fd3
chore: fix mock runtime warnings (#2085)
daniel-sanche 47324d4
chore(main): release 1.18.5 (#2084)
release-please[bot] 7cd4e6f
feat: leverage async anonymous credentials in tests (#2105)
ohmayr 6b9b839
build: update googleapis-common-protos (#2109)
parthea f498b2f
cleanup: refactor rest transport class in gapics (#2099)
ohmayr 315e30d
process: move assertion outside of `pytest.raises` context in showcas…
ohmayr 52d2ccd
cleanup: refactor empty call test macro (#2110)
ohmayr f71d69d
feat: Add support for reading ClientLibrarySettings from service conf…
parthea 33fc935
chore: refactor wrap method helper into a macro (#2111)
ohmayr c0ce83f
chore: Update response method macro to support async calls (#2113)
ohmayr 7811826
chore: support async in rest call common macro (#2114)
ohmayr 2b98655
chore: add default library settings (#2120)
parthea dc5b4ef
chore(deps): update all dependencies (#2125)
renovate-bot fb2b94e
chore: optionally generate async rest and client files (#2122)
ohmayr 367c140
feat: implement async rest transport constructor (#2123)
ohmayr 9243f30
chore: refactor empty_call_test (#2126)
parthea b1ef974
test: improve routing parameter assert (#2131)
parthea 2ca283e
fix: resolve issue where explicit routing metadata was not sent in as…
parthea f87d3c4
chore(deps): update all dependencies (#2162)
renovate-bot 3374a68
chore: update dependencies (#2185)
parthea 3307b1a
chore(deps): update all dependencies (#2190)
renovate-bot 4b2e890
fix: add support for field with name 'self' (#2205)
parthea a42469e
feat: add async rest transport support in gapics (#2164)
ohmayr 5670e04
chore: update api-core version in async extra (#2210)
ohmayr 013dcae
test: add routing parameter and empty call test for REST (#2165)
parthea ecc9865
chore(deps): update all dependencies (#2202)
renovate-bot ae2f632
fix: streaming for sync REST API calls (#2204)
ohmayr 4da2bf1
chore(main): release 1.19.0 (#2108)
release-please[bot] 842e324
fix: add default library settings for incorrect lib version (#2212)
ohmayr a4d42b4
fix: use disambiguated name for rpcs to avoid collisions (#2217)
parthea f84b46e
fix: resolve issue with wait operation mixin (#2218)
parthea 0faf062
build: add asyncio to requirements.txt (#2219)
parthea ee5a318
chore: update templated files (#2220)
parthea afc5591
chore(main): release 1.19.1 (#2216)
release-please[bot] 0ee5ab4
build: add presubmits for unit tests in golden files (#2224)
parthea 6f4474e
tests: Add required checks for showcase `_w_rest_async` (#2225)
parthea 3978deb
fix: allow `google-cloud-kms` 3.x (#2226)
parthea 5e6cf56
chore: update rest version in client info (#2228)
ohmayr 6712aaf
fix: Added underscores in services/types in index.rst.j2 (#2232)
gkevinzheng 866025a
feat: Add support for Python 3.13 (#2215)
parthea 588b915
chore(main): release 1.20.0 (#2227)
release-please[bot] 265858d
fix: allow google-cloud-documentai 3.x (#2237)
parthea acf866f
chore(main): release 1.20.1 (#2238)
release-please[bot] 7ffa74e
build: release script update (#2235)
parthea 0fdc38e
fix: disable universe-domain validation (#2236)
7c22dce
chore(main): release 1.20.2 (#2240)
release-please[bot] b2ed385
chore: update dependencies (#2248)
parthea 93bbaa2
chore(python): update dependencies in .kokoro/docker/docs (#2247)
gcf-owl-bot[bot] d8667ca
chore(deps): update all dependencies (#2252)
renovate-bot 800a907
chore: add template for metadata (#2253)
parthea 8426642
fix: fix typing issue with gRPC metadata when key ends in -bin (#2251)
parthea b5cc758
chore(deps): update all dependencies (#2260)
renovate-bot 96f1810
chore(deps): update all dependencies (#2267)
renovate-bot 9b9249a
feat: add debug log when creating client (#2265)
ohmayr 3d792f4
feat: add debug log when sending requests via REST (#2270)
parthea 233dc9c
chore(logging): standardize logging in _shared_macros (#2277)
vchudnov-g 1044768
chore: skip logging for streaming rest RPCs (#2280)
ohmayr 70753b4
chore: add test coverage for debug logging (#2281)
ohmayr 0af7cf4
fix(log): preserve dict of rest async response headers (#2288)
vchudnov-g d964d09
feat: add client logging support for sync gRPC (#2284)
ohmayr fffa457
feat: add client debug logging support for async gRPC (#2291)
ohmayr 102a1fd
chore(main): release 1.21.0 (#2259)
release-please[bot] 96e5fe3
chore(python): update dependencies in .kokoro/docker/docs (#2298)
gcf-owl-bot[bot] b3fe7a2
chore(deps): update all dependencies (#2278)
renovate-bot 52f3575
feat: Add REST Interceptors to support reading metadata (#2299)
parthea def8ec5
build: Use Ubuntu 22.04 for tests that require the use of Python 3.7 …
gkevinzheng 91b29b6
feat: add cred info to auth related errors (#2115)
arithmetic1728 332a50f
tests: remove generated routing parameter test for bidi/client side s…
parthea d66d418
chore: add documentation for logging (#2308)
ohmayr c03b1b6
feat: Add support for reading selective GAPIC generation methods from…
gkevinzheng 3ba958a
chore(python): fix docs publish build (#2311)
gcf-owl-bot[bot] 9162593
chore(deps): update all dependencies (#2305)
renovate-bot 78acc0c
chore(main): release 1.22.0 (#2302)
release-please[bot] 9cb386f
build: update all dependencies (#2321)
parthea e9d0d86
fix(deps): require grpc-google-iam-v1>=0.14.0 (#2327)
parthea ea16313
chore(main): release 1.22.1 (#2328)
release-please[bot] a3c15df
build: update all dependencies (#2330)
parthea cdeed04
feat: add ability to remove unversioned modules (#2329)
parthea 2309651
feat: Added support for internal methods in selective GAPIC generatio…
gkevinzheng 33ba80c
chore(main): release 1.23.0 (#2332)
release-please[bot] d954060
chore(deps): update all dependencies (#2324)
renovate-bot 52eecda
docs: fix minor typos (#2318)
parthea 63d2dcd
build: remove unused files (#2331)
parthea b85067b
build: migrate from autopep8 to black/flake8 (#2334)
parthea 22030ab
chore(main): release 1.23.1 (#2335)
release-please[bot] 5dfd771
fix: resolve rare issue where ValueError is not raised when both requ…
parthea 25f7b56
chore(main): release 1.23.2 (#2345)
release-please[bot] 033cd95
chore(python): conditionally load credentials in .kokoro/build.sh (#2…
gcf-owl-bot[bot] 9177ce6
fix: resolve issue where pre-release versions of dependencies are ins…
parthea d790558
chore(main): release 1.23.3 (#2348)
release-please[bot] be7f65e
fix: allow proto files to be included in the output of py_gapic_assem…
parthea cd31952
chore(main): release 1.23.4 (#2350)
release-please[bot] 422d926
fix: allow Protobuf 6.x (#2352)
parthea d59d6b4
build(deps): bump jinja2 from 3.1.5 to 3.1.6 (#2354)
dependabot[bot] b4cd728
chore(main): release 1.23.5 (#2353)
release-please[bot] 8637885
chore: remove unused files (#2356)
parthea b0f5836
chore: fix docs link in README (#2346)
parthea 90f3946
build: clean up generated noxfile (#2343)
parthea be6efe0
docs: update copyright year (#2363)
parthea a896aed
chore(main): release 1.23.6 (#2364)
release-please[bot] 094283c
build: update constraints file to test latest major versions (#2362)
parthea 68f3da8
fix: Fixed internal method generation naming issues (#2365)
gkevinzheng deda31b
fix: missing DEFAULT_HOST should still result in compiling code (#2051)
achew22 8c6dda4
build: remove showcase integration tests ads (#2370)
parthea 45eb8b4
tests: add showcase tests for reading grpc/rest response metadata (#2…
parthea 85e587b
refactor: reduce code duplication (#2373)
parthea f0005b1
feat: adds augmented pagination to account for BQ family of APIs (#2372)
chalmerlowe fe88aa2
chore: update generated .flake8 configuration file (#2376)
parthea 0f1a253
chore: add LICENSE to generated output (#2377)
parthea 46fb986
chore: update generated MANIFEST.in (#2378)
parthea e2d6d7e
chore: update generated noxfile.py (#2379)
parthea 3ed3d16
chore(main): release 1.24.0 (#2367)
release-please[bot] bfa6ab1
chore: update generated noxfile.py to cater for grafeas (#2380)
parthea 28e8aeb
chore: update generated docs (#2381)
parthea 2439c99
chore(main): release 1.24.1 (#2382)
release-please[bot] 34b692a
feat: Add protobuf runtime version to `x-goog-api-client` header (#2368)
parthea 720a2b1
chore(deps): update all dependencies (#2371)
renovate-bot 9ae7a3a
chore(main): release 1.25.0 (#2387)
release-please[bot] 9dfe21e
feat: add client debug logging support for server side streaming REST…
parthea ab4cc4a
build: update docs build (#2339)
parthea 09ba01e
chore(deps): update all dependencies (#2391)
renovate-bot 1c2b69d
chore(deps): update all dependencies (#2392)
renovate-bot a46fcdb
chore: use yaml.safe_load (#2398)
parthea 4532b1f
chore: remove unused scripts (#2400)
parthea c439722
chore(main): release 1.26.0 (#2390)
release-please[bot] edf1371
fix: Temporarily disable `test_<service>_api_version_header_async` wh…
parthea 46b1646
chore: depend on stable version of google.shopping.type (#2423)
vchudnov-g 2270ab9
chore(main): release 1.26.1 (#2430)
release-please[bot] d6687cd
chore(deps): update dependency protobuf to v6.31.1 [security] (#2422)
renovate-bot 6da96b9
build(deps): bump aiohttp from 3.11.18 to 3.12.14 (#2416)
dependabot[bot] 73b37d3
chore(deps): update dependency urllib3 to v2.5.0 [security] (#2413)
renovate-bot 6d6d126
chore(deps): update dependency requests to v2.32.4 [security] (#2403)
renovate-bot 69b49f6
chore(deps): update all dependencies (#2401)
renovate-bot 4bf299f
docs: minor formatting improvements (#2432)
parthea 842f4c8
chore: remove unused protobuf dependency in repositories.bzl (#2433)
parthea af571ef
chore(main): release 1.26.2 (#2434)
release-please[bot] 5568d7a
chore(deps): update all dependencies (#2436)
renovate-bot b290791
chore(deps): update all dependencies (#2437)
renovate-bot e6f2616
test: fix async showcase test (#2441)
parthea ca106d2
chore(deps): update all dependencies (#2442)
renovate-bot 75735ce
feat: add gapic-version generator option (#2440)
parthea 174e2cb
chore(main): release 1.27.0 (#2445)
release-please[bot] 1ba6209
tests: add testing for Python 3.14 Pre-release (#2344)
parthea 4817b71
chore(main): release 1.27.1 (#2447)
release-please[bot] c2ff28c
fix: deprecate credentials_file (#2454)
parthea 004de63
fix: resolve issue where rest-numeric-enums=False is not supported (#…
parthea 10b7590
chore(main): release 1.27.2 (#2455)
release-please[bot] 4a9db1e
chore: remove .github/sync-repo-settings.yaml (#2449)
parthea 10073df
fix: require grpcio >= 1.75.1 for Python 3.14 (#2452)
parthea ed73859
feat: Add support for Python 3.14 (#2451)
parthea 6730b9f
chore(main): release 1.28.0 (#2459)
release-please[bot] 695b27a
fix: fix gapic-version generator option for selective gapic generatio…
parthea 7c8c97e
chore(main): release 1.28.1 (#2461)
release-please[bot] 1450630
chore: add samples directory to lint paths (#2438)
parthea c0d8783
fix: bump the minimum version of google-apps-card to 0.3.0 (#2464)
parthea 3c7c67a
chore(main): release 1.28.2 (#2465)
release-please[bot] 3cbbcd3
fix: only format samples if the directory exists (#2466)
parthea 3503911
chore(main): release 1.28.3 (#2467)
release-please[bot] 32e15eb
feat: check Python and dependency versions in generated GAPICs (#2419)
vchudnov-g 5ed689d
chore(main): release 1.29.0 (#2468)
release-please[bot] fc32e47
tests: use older google-api-core when running tools with older runtim…
parthea cc86c71
chore(deps): update all dependencies (#2469)
renovate-bot 67eb1f0
tests: temporarily pin coverage to 7.11.0 (#2480)
parthea cbf42e5
chore(librarian): onboard to librarian (#2479)
parthea 46767d8
fix: add api_version to gapic_metadata.json (#2476)
noahdietz d1e6880
chore(deps): update requirements.txt (#2482)
parthea 6490322
feat: auto-enable mTLS when supported certificates are detected (#2472)
agrawalradhika-cell d9a2b48
fix: drop packaging and pkg_resources (#2477)
parthea 01cbbf2
chore: librarian release pull request: 20251114T152556Z (#2487)
gkevinzheng 1fdf60b
chore: remove obsolete scripts from generated code (#2489)
parthea 7ad17dd
chore: remove code formatting for noxfile.py (#2491)
parthea 7c9c47e
chore: specify verify_format=False when running pypandoc (#2504)
jskeet 32ac494
chore: librarian update image pull request: 20251211T164756Z (#2508)
parthea c34b0fe
chore: librarian release pull request: 20251212T154945Z (#2510)
parthea c7cc17b
fix: revert changes to code formatting in 1.30.1 (#2511)
parthea 2587290
chore: librarian release pull request: 20251215T231730Z (#2512)
parthea a419a26
chore(types): fix mypy checks (#2520)
daniel-sanche 6fde536
chore: librarian release pull request: 20260113T151024Z (#2522)
parthea 9b14f00
fix: add cryptography to constraints file (#2527)
parthea 50ab6eb
build(deps): bump pyasn1 from 0.6.1 to 0.6.2 (#2525)
dependabot[bot] 7f24004
chore: librarian release pull request: 20260120T170452Z (#2528)
parthea 64978dd
build(deps): bump urllib3 from 2.5.0 to 2.6.3 (#2519)
dependabot[bot] e52c25a
fix: fix mypy for services with extended operations methods (#2536)
parthea 037c531
chore: librarian release pull request: 20260126T181958Z (#2538)
parthea c84f7cd
chore: configure mypy to use python 3.14 (#2540)
ohmayr 35d1b0f
chore: cache proto context to optimize generator performance (#2531)
ohmayr 1f06194
fix: filter sphinx warnings related to adding a new line after lists …
chalmerlowe 3c1066b
fix: fix incorrect REST request serialization (#2549)
parthea 085bd41
chore: use import absolute.path as module syntax for pb2 imports (#2553)
ohmayr 95201e7
chore: librarian release pull request: 20260130T213357Z (#2551)
parthea 1795c56
chore(deps): update dependency protobuf to v6.33.5 [security] (#2552)
renovate-bot 6e1a479
chore: fix line length for code with inline mypy guard (#2554)
ohmayr f5a618e
chore: replace old python teams with cloud-sdk-python-team (#2555)
suztomo c7fc40e
fix: updates tests for ListValue response fields (#2532)
google-labs-jules[bot] 2e334b3
chore: fix service yaml command in nox sessions (#2558)
ohmayr b55188e
chore: replace isort and black with ruff (#2539)
ohmayr 8db5c25
chore: update dev instructions to include `nox -s format` (#2559)
ohmayr e37ae00
chore: librarian release pull request: 20260205T232802Z (#2561)
ohmayr a3c3574
chore: fix mypy issue for `__func__` type (#2562)
ohmayr 3ae5bfd
chore: librarian release pull request: 20260209T200531Z (#2564)
ohmayr 6f74304
chore: Migrate gsutil usage to gcloud storage (#2546)
gurusai-voleti bf939b1
tests: update repo location for core deps (#2566)
parthea 718768a
chore(deps): update dependency aiohttp to v3.13.3 [security] (#2560)
renovate-bot 246ea38
chore: librarian release pull request: 20260219T200512Z (#2567)
parthea e3178d8
chore: require Python ≥ 3.9 (#2502)
vchudnov-g 10b3101
tests: update repo location for google-auth (#2573)
parthea 612a37b
fix: Allow protobuf 7.x (#2575)
rfrerebe-stx 65b3094
chore(docs): add docstrings for api_audience and interceptor (#2571)
daniel-sanche e901fea
fix: improve type checking (#2530)
daniel-sanche dc2a418
chore: librarian release pull request: 20260309T132416Z (#2576)
daniel-sanche d723aac
chore(docs): fix transport README (#2572)
daniel-sanche 391ec40
tests: downgrade mypy to 1.16.0 (#2580)
parthea 73d3f25
chore: librarian release pull request: 20260311T165551Z (#2581)
parthea b5fae78
chore: bump minimum version of google-cloud-access-context-manager (#…
parthea a146ec1
chore: bump minimum version of google-cloud-documentai to 2.4.1 (#2584)
parthea d9db2f6
tests: remove tests for protobuf cpp backend (#2585)
parthea a57a530
chore: bump minimum version of google-cloud-os-config and google-clou…
parthea 4c01c8e
chore: librarian release pull request: 20260312T133909Z (#2587)
parthea e5418b5
chore: bump versions for google-cloud-access-context-manager, google-…
parthea 70a357d
chore: librarian release pull request: 20260313T154050Z (#2589)
parthea 6ccd371
fix(docs): async samples missing await (#2577)
daniel-sanche 5a3644b
build(deps): bump pyasn1 from 0.6.2 to 0.6.3 (#2591)
dependabot[bot] 2b3b06c
fix: Use proper SPDX license identifier (#2594)
Shortfinga 521bfd0
chore: testing constraints target minimum supported versions (#2590)
daniel-sanche 8237215
Merge remote-tracking branch 'remote.googleapis/gapic-generator-pytho…
ohmayr 5be08e4
Trigger owlbot post-processor
ohmayr ae69638
build: gapic-generator migration: adjust owlbot-related files
ohmayr 5d135bb
add state.yaml
ohmayr cfce45e
add placeholders for prerelease_deps and core_deps_from_source
ohmayr bc4370b
add presubmits for gapic-generator
ohmayr 5120226
update repo-metadata file
ohmayr 0a42061
remove unwanted files
ohmayr 02307aa
update repo-metadata file
ohmayr 2103b92
update gapic-generator tests workflow
ohmayr 1fa67b9
skip linting
ohmayr b74b8c0
add placeholder for lint_setup_py
ohmayr c174901
add placeholder for system test nox session
ohmayr c23b067
fix typo
ohmayr b91c666
avoid running github jobs if not relevant
ohmayr 2d7e533
address PR feedback
ohmayr a331c0e
address PR feedback
ohmayr cf70e04
remove owlbot staging
ohmayr 5c74873
fix prerelease goldens
ohmayr 46ee8a0
fix presubmit
ohmayr 20f5724
Trigger CI
ohmayr e3731d5
Merge branch 'main' into migration.gapic-generator-python.migration.2…
ohmayr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| name: Gapic Generator Specialized Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'packages/gapic-generator/**' | ||
| - '.github/workflows/gapic-generator-tests.yml' | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'packages/gapic-generator/**' | ||
|
|
||
| concurrency: | ||
| group: gapic-gen-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| SHOWCASE_VERSION: 0.35.0 | ||
| PROTOC_VERSION: 3.20.2 | ||
| OLDEST_PYTHON: 3.9 | ||
| LATEST_STABLE_PYTHON: 3.14 | ||
| PREVIEW_PYTHON_VERSION: 3.14 | ||
| ALL_PYTHON: "['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']" | ||
|
|
||
| jobs: | ||
| check_changes: | ||
| # We use a job-level 'if' with dorny/paths-filter because GitHub's top-level | ||
| # 'on: pull_request: paths' can be bypassed during repository-wide migrations | ||
| # or structural changes. This ensures these specialized (and heavy) matrix | ||
| # jobs stay silent on PRs that do not touch the generator. | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| run_generator: ${{ steps.filter.outputs.generator }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dorny/paths-filter@v3 | ||
| id: filter | ||
| with: | ||
| filters: | | ||
| generator: | ||
| - 'packages/gapic-generator/**' | ||
| - '.github/workflows/gapic-generator-tests.yml' | ||
|
|
||
| # Preserve the workaround for env variables in matrix | ||
| python_config: | ||
| needs: check_changes | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| all_python: ${{ env.ALL_PYTHON }} | ||
| oldest_python: ${{ env.OLDEST_PYTHON }} | ||
| latest_stable_python: ${{ env.LATEST_STABLE_PYTHON }} | ||
| steps: | ||
| - run: echo "Initializing config" | ||
|
|
||
| showcase-unit: | ||
| needs: [check_changes, python_config] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python: ${{ fromJSON(needs.python_config.outputs.all_python) }} | ||
| variant: ['', _alternative_templates, _mixins, _alternative_templates_mixins, _w_rest_async] | ||
| logging_scope: ["", "google"] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "${{ matrix.python }}" | ||
| - name: Install System Deps & Protoc | ||
| run: | | ||
| sudo apt-get update && sudo apt-get install -y curl pandoc unzip | ||
| sudo mkdir -p /usr/src/protoc/ && sudo chown -R ${USER} /usr/src/ | ||
| curl --location https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip --output /usr/src/protoc/protoc.zip | ||
| cd /usr/src/protoc/ && unzip protoc.zip | ||
| sudo ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc | ||
| - name: Run Nox | ||
| env: | ||
| GOOGLE_SDK_PYTHON_LOGGING_SCOPE: ${{ matrix.logging_scope }} | ||
| run: | | ||
| pip install nox | ||
| cd packages/gapic-generator | ||
| nox -s showcase_unit${{ matrix.variant }}-${{ matrix.python }} | ||
|
|
||
| goldens: | ||
| needs: [check_changes, python_config] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.LATEST_STABLE_PYTHON }} | ||
| - name: Install System Deps | ||
| run: sudo apt-get update && sudo apt-get install -y pandoc | ||
| - name: Run Goldens (Lint/Unit) | ||
| run: | | ||
| pip install nox | ||
| cd packages/gapic-generator | ||
| for pkg in credentials eventarc logging redis; do | ||
| nox -f tests/integration/goldens/$pkg/noxfile.py -s format lint unit-${{ env.LATEST_STABLE_PYTHON }} | ||
| done | ||
|
|
||
| fragment-snippet: | ||
| needs: [check_changes, python_config] | ||
| strategy: | ||
| matrix: | ||
| python: ["3.10", "3.14"] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| # This fixes the Pandoc error | ||
| - name: Install System Deps & Protoc | ||
| run: | | ||
| sudo apt-get update && sudo apt-get install -y curl pandoc unzip | ||
| sudo mkdir -p /usr/src/protoc/ && sudo chown -R ${USER} /usr/src/ | ||
| curl --location https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip --output /usr/src/protoc/protoc.zip | ||
| cd /usr/src/protoc/ && unzip protoc.zip | ||
| sudo ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc | ||
| - name: Run Tests | ||
| run: | | ||
| pip install nox | ||
| cd packages/gapic-generator | ||
| # Run fragment for current matrix python | ||
| nox -s fragment-${{ matrix.python }} | ||
| # Run snippetgen only on the latest stable to avoid the "Python not found" error | ||
| if [ "${{ matrix.python }}" == "${{ env.LATEST_STABLE_PYTHON }}" ]; then | ||
| nox -s snippetgen | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # See https://github.com/bazelbuild/bazelisk | ||
| USE_BAZEL_VERSION=6.5.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # New protobuf requires C++17 | ||
| build --repo_env=BAZEL_CXXOPTS="-std=c++17" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [run] | ||
| branch = True | ||
| omit = | ||
| gapic/cli/*.py | ||
| *_pb2.py | ||
|
|
||
| [report] | ||
| fail_under = 100 | ||
| show_missing = True | ||
| exclude_lines = | ||
| # Re-enable the standard pragma | ||
| pragma: NO COVER | ||
| # Enable an English version. | ||
| Impossible; skip coverage checks. | ||
| # Ignore debug-only repr | ||
| def __repr__ | ||
| # Abstract methods by definition are not invoked | ||
| @abstractmethod | ||
| @abc.abstractmethod | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| [flake8] | ||
| ignore = | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E123, E124 | ||
| # Closing bracket mismatches opening bracket's line. | ||
| # This works poorly with type annotations in method declarations. | ||
| E123, E124 | ||
| # Line over-indented for visual indent. | ||
| # This works poorly with type annotations in method declarations. | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E126, E128, E131 | ||
| E126, E128, E131 | ||
| # Line break after binary operator. | ||
| # This catches line breaks after "and" / "or" as a means of breaking up | ||
| # long if statements, which PEP 8 explicitly encourages. | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): W504 | ||
| W504 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E203 | ||
| E203 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E501 | ||
| E501 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E712 | ||
| E712 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E711 | ||
| E711 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E722 | ||
| E722 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): E741 | ||
| E741 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): F401 | ||
| F401 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): F541 | ||
| F541 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): F841 | ||
| F841 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): F811 | ||
| F811 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): W503 | ||
| W503 | ||
| # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): W291 | ||
| W291 | ||
| exclude = | ||
| # Exclude golden files | ||
| tests/integration | ||
| # Exclude generated protobuf code | ||
| *_pb2.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "name": "gapic-generator", | ||
| "name_pretty": "Google API Client Generator for Python", | ||
| "client_documentation": "https://gapic-generator-python.readthedocs.io/en/stable/", | ||
| "product_documentation": "", | ||
| "issue_tracker": "https://github.com/googleapis/google-cloud-python/issues", | ||
| "release_level": "stable", | ||
| "language": "python", | ||
| "library_type": "CORE", | ||
| "repo": "googleapis/google-cloud-python", | ||
| "distribution_name": "gapic-generator", | ||
| "default_version": "", | ||
| "codeowner_team": "@googleapis/cloud-sdk-python-team" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| load("//:gapic_generator_python.bzl", "pandoc_binary", "pandoc_toolchain") | ||
| load("@gapic_generator_python_pip_deps//:requirements.bzl", "requirement") | ||
| load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") | ||
|
|
||
| toolchain_type( | ||
| name = "pandoc_toolchain_type", | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| pandoc_toolchain( | ||
| exec_compatible_with = [ | ||
| "@platforms//os:linux", | ||
| "@platforms//cpu:arm64", | ||
| ], | ||
| platform = "linux_arm_64", | ||
| ) | ||
|
|
||
| pandoc_toolchain( | ||
| exec_compatible_with = [ | ||
| "@platforms//os:linux", | ||
| "@platforms//cpu:x86_64", | ||
| ], | ||
| platform = "linux_x86_64", | ||
| ) | ||
|
|
||
| pandoc_toolchain( | ||
| exec_compatible_with = [ | ||
| "@platforms//os:osx", | ||
| "@platforms//cpu:arm64", | ||
| ], | ||
| platform = "macOS_arm_64", | ||
| ) | ||
|
|
||
| pandoc_toolchain( | ||
| exec_compatible_with = [ | ||
| "@platforms//os:osx", | ||
| "@platforms//cpu:x86_64", | ||
| ], | ||
| platform = "macOS_x86_64", | ||
| ) | ||
|
|
||
| pandoc_toolchain( | ||
| exec_compatible_with = [ | ||
| "@platforms//os:windows", | ||
| "@platforms//cpu:x86_64", | ||
| ], | ||
| platform = "windows_x86_64", | ||
| ) | ||
|
|
||
| pandoc_binary( | ||
| name = "pandoc_binary", | ||
| ) | ||
|
|
||
| py_runtime( | ||
| name = "pyenv3_runtime", | ||
| interpreter = ":pyenv3wrapper.sh", | ||
| python_version = "PY3", | ||
| ) | ||
|
|
||
| py_runtime_pair( | ||
| name = "pyenv3_runtime_pair", | ||
| py3_runtime = ":pyenv3_runtime", | ||
| ) | ||
|
|
||
| toolchain( | ||
| name = "pyenv3_toolchain", | ||
| toolchain = ":pyenv3_runtime_pair", | ||
| toolchain_type = "@bazel_tools//tools/python:toolchain_type", | ||
| ) | ||
|
|
||
| py_binary( | ||
| name = "gapic_plugin", | ||
| srcs = glob(["gapic/**/*.py"]), | ||
| data = [":pandoc_binary"] + glob([ | ||
| "gapic/**/*.j2", | ||
| "gapic/**/.*.j2", | ||
| ]), | ||
| main = "gapic/cli/generate_with_pandoc.py", | ||
| python_version = "PY3", | ||
| visibility = ["//visibility:public"], | ||
| deps = [ | ||
| "@com_github_grpc_grpc//src/python/grpcio/grpc:grpcio", | ||
| requirement("protobuf"), | ||
| requirement("click"), | ||
| requirement("google-api-core"), | ||
| requirement("googleapis-common-protos"), | ||
| requirement("jinja2"), | ||
| requirement("MarkupSafe"), | ||
| requirement("pypandoc"), | ||
| requirement("PyYAML"), | ||
| requirement("grpc-google-iam-v1"), | ||
| ], | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please delete:
owl-bot-staging/gapic-generator/gapic-generator/gapic-generator.txt