From 353575cd45deba937ffc48f54b4e4b6378143207 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 19:58:06 +0000 Subject: [PATCH 1/2] chore(librarian): onboard to librarian --- .github/.OwlBot.lock.yaml | 17 ------ .github/.OwlBot.yaml | 19 ------ .github/auto-approve.yml | 3 - .github/release-please.yml | 2 - .github/release-trigger.yml | 2 - .github/sync-repo-settings.yaml | 30 --------- .librarian/state.yaml | 10 +++ owlbot.py | 105 -------------------------------- 8 files changed, 10 insertions(+), 178 deletions(-) delete mode 100644 .github/.OwlBot.lock.yaml delete mode 100644 .github/.OwlBot.yaml delete mode 100644 .github/auto-approve.yml delete mode 100644 .github/release-please.yml delete mode 100644 .github/release-trigger.yml delete mode 100644 .github/sync-repo-settings.yaml create mode 100644 .librarian/state.yaml delete mode 100644 owlbot.py diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 4a311db0..00000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:543e209e7c1c1ffe720eb4db1a3f045a75099304fb19aa11a47dc717b8aae2a9 -# created: 2025-10-09T14:48:42.914384887Z diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 3cbe64b8..00000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - -begin-after-commit-hash: be22498ce258bf2d5fe12fd696d3ad9a2b6c430e - diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml deleted file mode 100644 index 311ebbb8..00000000 --- a/.github/auto-approve.yml +++ /dev/null @@ -1,3 +0,0 @@ -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve -processes: - - "OwlBotTemplateChanges" diff --git a/.github/release-please.yml b/.github/release-please.yml deleted file mode 100644 index 466597e5..00000000 --- a/.github/release-please.yml +++ /dev/null @@ -1,2 +0,0 @@ -releaseType: python -handleGHRelease: true diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml deleted file mode 100644 index e786e866..00000000 --- a/.github/release-trigger.yml +++ /dev/null @@ -1,2 +0,0 @@ -enabled: true -multiScmName: python-bigquery-sqlalchemy diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index c3e26318..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings -# Rules for main branch protection -branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `main` -- pattern: main - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true - requiredStatusCheckContexts: - - 'cla/google' - - 'OwlBot Post Processor' - - 'Kokoro' - - 'Samples - Lint' - - 'Samples - Python 3.9' - - 'Samples - Python 3.10' - - 'Samples - Python 3.11' - - 'Samples - Python 3.12' - - 'Samples - Python 3.13' - -permissionRules: - - team: actools-python - permission: admin - - team: actools - permission: admin - - team: yoshi-python - permission: push - - team: python-samples-owners - permission: push - - team: python-samples-reviewers - permission: push diff --git a/.librarian/state.yaml b/.librarian/state.yaml new file mode 100644 index 00000000..bfa0d9c0 --- /dev/null +++ b/.librarian/state.yaml @@ -0,0 +1,10 @@ +image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:39628f6e89c9cad27973b9a39a50f7052bec0435ee58c7027b4fa6b655943e31 +libraries: + - id: sqlalchemy-bigquery + version: 1.16.0 + apis: [] + source_roots: + - . + preserve_regex: [] + remove_regex: [] + tag_format: v{version} diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index e5e1d8b4..00000000 --- a/owlbot.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""This script is used to synthesize generated parts of this library.""" - -import pathlib -import re - -import synthtool as s -from synthtool import gcp -from synthtool.languages import python - -REPO_ROOT = pathlib.Path(__file__).parent.absolute() - -common = gcp.CommonTemplates() - -# ---------------------------------------------------------------------------- -# Add templated files -# ---------------------------------------------------------------------------- -extras = ["tests"] -extras_by_python = { - "3.9": ["tests", "alembic", "bqstorage"], - "3.11": ["tests", "geography", "bqstorage"], - "3.12": ["tests", "geography", "bqstorage"], - "3.13": ["tests", "geography", "bqstorage"], - "3.14": ["tests", "geography", "bqstorage"], -} -templated_files = common.py_library( - unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], - system_test_python_versions=["3.9", "3.12", "3.13", "3.14"], - cov_level=100, - unit_test_extras=extras, - unit_test_extras_by_python=extras_by_python, - system_test_extras=extras, - system_test_extras_by_python=extras_by_python, -) -s.move( - templated_files, - excludes=[ - # sqlalchemy-bigquery was originally licensed MIT - "LICENSE", - "docs/multiprocessing.rst", - # exclude gh actions as credentials are needed for tests - ".github/workflows", - "README.rst", - "renovate.json", - ], -) - -# ---------------------------------------------------------------------------- -# Fixup files -# ---------------------------------------------------------------------------- - -s.replace( - [".coveragerc"], - "google/cloud/__init__.py", - "sqlalchemy_bigquery/requirements.py", -) - - -# Add DB config for SQLAlchemy dialect test suite. -# https://github.com/googleapis/python-bigquery-sqlalchemy/issues/89 -s.replace( - ["setup.cfg"], - "universal = 1\n", - """universal = 1 -""", -) - -# ---------------------------------------------------------------------------- -# Samples templates -# ---------------------------------------------------------------------------- - - -python.py_samples(skip_readmes=True) - -s.replace( - ["./samples/snippets/noxfile.py"], - """session.install\("-e", _get_repo_root\(\)\)""", - """session.install("-e", _get_repo_root()) - else: - # ensure that sqlalchemy_bigquery gets installed - # for tests that are not based on source - session.install("sqlalchemy_bigquery")""", -) - - -# ---------------------------------------------------------------------------- -# Final cleanup -# ---------------------------------------------------------------------------- - -s.shell.run(["nox", "-s", "blacken"], hide_output=False) -for noxfile in REPO_ROOT.glob("samples/**/noxfile.py"): - s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) From 784a4e45c204b7653aecb8c90abbe5cb3ba0209c Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 11 Nov 2025 02:01:36 +0000 Subject: [PATCH 2/2] update librarian sha --- .librarian/state.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.librarian/state.yaml b/.librarian/state.yaml index bfa0d9c0..4f117613 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -1,4 +1,4 @@ -image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:39628f6e89c9cad27973b9a39a50f7052bec0435ee58c7027b4fa6b655943e31 +image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 libraries: - id: sqlalchemy-bigquery version: 1.16.0