Skip to content

Commit 1f7f160

Browse files
authored
Merge branch 'main' into fix-empty-last-chunk
2 parents 31e1967 + a1fd6f3 commit 1f7f160

File tree

6,237 files changed

+5509794
-1379940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,237 files changed

+5509794
-1379940
lines changed

.coveragerc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[report]
2-
omit = */samples/*
2+
omit =
3+
*/samples/*
4+
# Issue tracked in https://github.com/googleapis/google-api-python-client/issues/2132
5+
describe.py
36
exclude_lines =
47
# Re-enable the standard pragma
58
pragma: NO COVER

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
17-
# created: 2022-05-05T22:08:23.383410683Z
16+
digest: sha256:543e209e7c1c1ffe720eb4db1a3f045a75099304fb19aa11a47dc717b8aae2a9
17+
# created: 2025-10-09T14:48:42.914384887Z

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

7-
# The @googleapis/yoshi-python is the default owner for changes in this repo
8-
* @googleapis/yoshi-python
7+
# Default owners for changes in this repo
8+
* @googleapis/yoshi-python @googleapis/python-core-client-libraries
99

1010
# The python-samples-reviewers team is the default owner for samples changes
11-
/samples/ @googleapis/python-samples-owners
11+
/samples/ @googleapis/python-samples-owners @googleapis/python-core-client-libraries
1212

1313
# For more information, see https://github.com/googleapis/repo-automation-bots/blob/main/packages/auto-approve/README.md
14-
.github/auto-approve.yml @googleapis/github-automation @googleapis/yoshi-python
14+
.github/auto-approve.yml @googleapis/python-core-client-libraries @googleapis/yoshi-python
1515

1616
# The following is needed to auto-approve changes to static discovery artifacts and generated documentation.
1717
/docs/dyn/*.html @yoshi-approver @googleapis/yoshi-python

.github/auto-approve.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve
22
processes:
3+
- "UpdateDiscoveryArtifacts"
34
- "OwlBotTemplateChanges"

.github/auto-label.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,3 +13,8 @@
1313
# limitations under the License.
1414
requestsize:
1515
enabled: true
16+
17+
path:
18+
pullrequest: true
19+
paths:
20+
samples: "samples"

.github/blunderbuss.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Blunderbuss config
2+
#
3+
# This file controls who is assigned for pull requests and issues.
4+
# Note: This file is autogenerated. To make changes to the assignee
5+
# team, please update `codeowner_team` in `.repo-metadata.json`.
6+
7+
assign_issues:
8+
- googleapis/python-core-client-libraries
9+
10+
assign_issues_by:
11+
- labels:
12+
- "samples"
13+
to:
14+
- googleapis/python-samples-reviewers
15+
16+
assign_prs:
17+
- googleapis/python-core-client-libraries

.github/release-trigger.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
enabled: true
2+
multiScmName: google-api-python-client

.github/sync-repo-settings.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ branchProtectionRules:
1515
- 'Samples - Python 3.8'
1616
- 'Samples - Python 3.9'
1717
- 'Samples - Python 3.10'
18+
- 'Samples - Python 3.11'
19+
- 'Samples - Python 3.12'
20+
- 'Samples - Python 3.13'
21+
- 'Samples - Python 3.14'
1822
permissionRules:
1923
- team: actools-python
2024
permission: admin

.github/workflows/main.yml

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
# * is a special character in YAML so you have to quote this string
2121
# Run this Github Action every Tuesday at 7 AM UTC
2222
- cron: '0 7 * * 2'
23+
workflow_dispatch:
2324

2425
jobs:
2526
build:
@@ -29,19 +30,28 @@ jobs:
2930
steps:
3031
- name: Get current date
3132
id: date
32-
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d')"
33+
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d-%HH%MM%SS')"
34+
35+
- name: Sync fork
36+
run: gh repo sync $REPOSITORY -b $BRANCH_NAME
37+
env:
38+
REPOSITORY: 'yoshi-code-bot/google-api-python-client'
39+
BRANCH_NAME: 'refs/heads/main'
40+
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
3341

3442
- name: Check out main branch
35-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
3644
with:
3745
ref: refs/heads/main
46+
repository: 'yoshi-code-bot/google-api-python-client'
47+
token: ${{secrets.YOSHI_CODE_BOT_TOKEN}}
3848

3949
- name: Create branch
4050
run: |
4151
git checkout -b update-discovery-artifacts-${{ steps.date.outputs.current_date }}
4252
4353
- name: Set up Python 3.9
44-
uses: actions/setup-python@v3
54+
uses: actions/setup-python@v5
4555
with:
4656
python-version: 3.9
4757

@@ -68,7 +78,7 @@ jobs:
6878
working-directory: ./scripts
6979

7080
- name: Push changes
71-
run: git push -f --set-upstream origin update-discovery-artifacts-${{ steps.date.outputs.current_date }}
81+
run: git push -u origin update-discovery-artifacts-${{ steps.date.outputs.current_date }}
7282

7383
- name: Prepare summary for PR Body
7484
id: pr_body
@@ -83,43 +93,8 @@ jobs:
8393
working-directory: ./scripts
8494

8595
- name: Create PR
86-
uses: actions/github-script@v6.1.0
87-
with:
88-
github-token: ${{secrets.YOSHI_CODE_BOT_TOKEN}}
89-
script: |
90-
async function createPR () {
91-
const { owner, repo } = context.repo
92-
const branch = 'update-discovery-artifacts-${{ steps.date.outputs.current_date }}'
93-
let prBody = `${{ steps.pr_body.outputs.change_summary }}`
94-
const prTitle = 'chore: Update discovery artifacts'
95-
const pullRequests = await github.rest.pulls.list({
96-
owner: owner,
97-
repo: repo,
98-
head: `${owner}:${branch}`,
99-
state: 'open'
100-
})
101-
102-
if (pullRequests.data.length === 1) {
103-
prNumber = pullRequests.data[0].number
104-
await github.rest.pulls.update({
105-
owner: owner,
106-
repo: repo,
107-
pull_number: prNumber,
108-
title: prTitle,
109-
body: prBody
110-
})
111-
console.log('Updated PR')
112-
} else {
113-
const createPrResult = await github.rest.pulls.create({
114-
owner: owner,
115-
repo: repo,
116-
base: 'main',
117-
head: `${owner}:${branch}`,
118-
title: prTitle,
119-
body: prBody
120-
})
121-
prNumber = createPrResult.data.number
122-
console.log('Created PR')
123-
}
124-
}
125-
createPR()
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
98+
PR_TITLE: "chore: Update discovery artifacts"
99+
run: |
100+
gh pr create -R "googleapis/google-api-python-client" -B "main" --title "$PR_TITLE" --body "${{ steps.pr_body.outputs.change_summary }}"

.kokoro/build.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2018 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -15,11 +15,13 @@
1515

1616
set -eo pipefail
1717

18+
CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}")
19+
1820
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19-
PROJECT_ROOT="github/google-api-python-client"
21+
PROJECT_ROOT=$(realpath "${CURRENT_DIR}/..")
2022
fi
2123

22-
cd "${PROJECT_ROOT}"
24+
pushd "${PROJECT_ROOT}"
2325

2426
# Disable buffering, so that the logs stream through.
2527
export PYTHONUNBUFFERED=1
@@ -28,17 +30,16 @@ export PYTHONUNBUFFERED=1
2830
env | grep KOKORO
2931

3032
# Setup service account credentials.
31-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
33+
if [[ -f "${KOKORO_GFILE_DIR}/service-account.json" ]]
34+
then
35+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
36+
fi
3237

3338
# Setup project id.
34-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
35-
36-
# Remove old nox
37-
python3 -m pip uninstall --yes --quiet nox-automation
38-
39-
# Install nox
40-
python3 -m pip install --upgrade --quiet nox
41-
python3 -m nox --version
39+
if [[ -f "${KOKORO_GFILE_DIR}/project-id.json" ]]
40+
then
41+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
42+
fi
4243

4344
# If this is a continuous build, send the test log to the FlakyBot.
4445
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
@@ -53,7 +54,7 @@ fi
5354
# If NOX_SESSION is set, it only runs the specified session,
5455
# otherwise run all the sessions.
5556
if [[ -n "${NOX_SESSION:-}" ]]; then
56-
python3 -m nox -s ${NOX_SESSION:-}
57+
python3 -m nox -s ${NOX_SESSION:-}
5758
else
58-
python3 -m nox
59+
python3 -m nox
5960
fi

0 commit comments

Comments
 (0)