Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 5e359a0

Browse files
chore: migrate to owl-bot (#124)
* chore: migrate to owl bot * chore: copy files from googleapis-gen ad5147b2c3694044935301527f68b951c2e1f419 * chore: run the post processor * fix: proper quotes owlbot.py Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent a0a0964 commit 5e359a0

4 files changed

Lines changed: 45 additions & 169 deletions

File tree

.github/.OwlBot.lock.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker:
2+
digest: sha256:612842ba5ccf62b4e3983fe6dc453cf66883c74bc168aa62da7acaed1e2fdc93
3+
image: gcr.io/repo-automation-bots/owlbot-python:latest
4+

.github/.OwlBot.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
docker:
16+
image: gcr.io/repo-automation-bots/owlbot-python:latest
17+
18+
deep-remove-regex:
19+
- /owl-bot-staging
20+
21+
deep-copy-regex:
22+
- source: /google/cloud/bigquery/datatransfer/(v.*)/.*-py/(.*)
23+
dest: /owl-bot-staging/$1/$2
24+
25+
begin-after-commit-hash: ad5147b2c3694044935301527f68b951c2e1f419
26+

synth.py renamed to owlbot.py

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,29 @@
2020
from synthtool.languages import python
2121

2222

23-
gapic = gcp.GAPICBazel()
2423
common = gcp.CommonTemplates()
25-
versions = ["v1"]
2624

2725
# ----------------------------------------------------------------------------
2826
# Generate bigquery_datatransfer GAPIC layer
2927
# ----------------------------------------------------------------------------
30-
for version in versions:
31-
library = gapic.py_library(
32-
service="bigquery_datatransfer",
33-
version=version,
34-
bazel_target=(
35-
f"//google/cloud/bigquery/datatransfer/{version}:"
36-
"bigquery-datatransfer-v1-py"
37-
),
38-
include_protos=True,
28+
for library in s.get_staging_dirs("v1"):
29+
# Fix missing async client in datatransfer_v1
30+
# https://github.com/googleapis/gapic-generator-python/issues/815
31+
s.replace(
32+
library / "google/cloud/bigquery_datatransfer_v1/__init__.py",
33+
r"from \.services\.data_transfer_service import DataTransferServiceClient",
34+
"\\g<0>\nfrom .services.data_transfer_service import DataTransferServiceAsyncClient",
3935
)
36+
s.replace(
37+
library / "google/cloud/bigquery_datatransfer_v1/__init__.py",
38+
r"'DataTransferServiceClient',",
39+
'\\g<0>\n "DataTransferServiceAsyncClient"',
40+
)
41+
4042
s.move(library, excludes=["*.tar.gz", "docs/index.rst", "README.rst", "setup.py"])
4143

44+
s.remove_staging_dirs()
45+
4246

4347
# ----------------------------------------------------------------------------
4448
# Add templated files
@@ -52,17 +56,4 @@
5256

5357
python.py_samples(skip_readmes=True)
5458

55-
# Fix missing async client in datatransfer_v1
56-
# https://github.com/googleapis/gapic-generator-python/issues/815
57-
s.replace(
58-
"google/cloud/bigquery_datatransfer_v1/__init__.py",
59-
r"from \.services\.data_transfer_service import DataTransferServiceClient",
60-
"\\g<0>\nfrom .services.data_transfer_service import DataTransferServiceAsyncClient",
61-
)
62-
s.replace(
63-
"google/cloud/bigquery_datatransfer_v1/__init__.py",
64-
r"'DataTransferServiceClient',",
65-
'\\g<0>\n "DataTransferServiceAsyncClient"',
66-
)
67-
6859
s.shell.run(["nox", "-s", "blacken"], hide_output=False)

synth.metadata

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)