Skip to content

Commit 1e0c741

Browse files
Google APIscopybara-github
authored andcommitted
chore: migrate bigtable to the Python microgenerator
PiperOrigin-RevId: 356992836
1 parent dd89b0c commit 1e0c741

2 files changed

Lines changed: 12 additions & 90 deletions

File tree

google/bigtable/admin/v2/BUILD.bazel

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -157,66 +157,25 @@ go_gapic_assembly_pkg(
157157

158158
##############################################################################
159159
# Python
160-
# DO NOT OVERRIDE with autogenerated rules if NOT migrated to Python Microgen
161160
##############################################################################
162161
load(
163162
"@com_google_googleapis_imports//:imports.bzl",
164-
"moved_proto_library",
165-
"py_grpc_library",
166-
"py_proto_library",
167-
py_gapic_assembly_pkg = "py_gapic_assembly_pkg_legacy",
168-
py_gapic_library = "py_gapic_library_legacy",
169-
)
170-
171-
moved_proto_library(
172-
name = "admin_moved_proto",
173-
srcs = [":admin_proto"],
174-
deps = [
175-
"//google/api:annotations_proto",
176-
"//google/api:client_proto",
177-
"//google/api:field_behavior_proto",
178-
"//google/api:resource_proto",
179-
"//google/iam/v1:iam_policy_proto",
180-
"//google/iam/v1:policy_proto",
181-
"//google/longrunning:operations_proto",
182-
"@com_google_protobuf//:duration_proto",
183-
"@com_google_protobuf//:empty_proto",
184-
"@com_google_protobuf//:field_mask_proto",
185-
"@com_google_protobuf//:timestamp_proto",
186-
],
187-
)
188-
189-
py_proto_library(
190-
name = "admin_py_proto",
191-
plugin = "@protoc_docs_plugin//:docs_plugin",
192-
deps = [":admin_moved_proto"],
193-
)
194-
195-
py_grpc_library(
196-
name = "admin_py_grpc",
197-
srcs = [":admin_moved_proto"],
198-
deps = [":admin_py_proto"],
163+
"py_gapic_assembly_pkg",
164+
"py_gapic_library",
199165
)
200166

201167
py_gapic_library(
202-
name = "admin_py_gapic",
203-
src = ":admin_proto_with_info",
204-
gapic_yaml = "bigtableadmin_gapic.yaml",
205-
package = "google.bigtable.admin.v2",
206-
service_yaml = "bigtableadmin_v2.yaml",
207-
deps = [
208-
":admin_py_grpc",
209-
":admin_py_proto",
210-
],
168+
name = "bigtable_admin_py_gapic",
169+
srcs = [":admin_proto"],
170+
grpc_service_config = "bigtableadmin_grpc_service_config.json",
171+
opt_args = ["python-gapic-namespace=google.cloud", "python-gapic-name=bigtable_admin"],
211172
)
212173

213174
# Open Source Packages
214175
py_gapic_assembly_pkg(
215176
name = "bigtable-admin-v2-py",
216177
deps = [
217-
":admin_py_gapic",
218-
":admin_py_grpc",
219-
":admin_py_proto",
178+
":bigtable_admin_py_gapic",
220179
],
221180
)
222181

google/bigtable/v2/BUILD.bazel

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -140,61 +140,24 @@ go_gapic_assembly_pkg(
140140

141141
##############################################################################
142142
# Python
143-
# DO NOT OVERRIDE with autogenerated rules if NOT migrated to Python Microgen
144143
##############################################################################
145144
load(
146145
"@com_google_googleapis_imports//:imports.bzl",
147-
"moved_proto_library",
148-
"py_grpc_library",
149-
"py_proto_library",
150-
py_gapic_assembly_pkg = "py_gapic_assembly_pkg_legacy",
151-
py_gapic_library = "py_gapic_library_legacy",
152-
)
153-
154-
moved_proto_library(
155-
name = "bigtable_moved_proto",
156-
srcs = [":bigtable_proto"],
157-
deps = [
158-
"//google/api:annotations_proto",
159-
"//google/api:client_proto",
160-
"//google/api:field_behavior_proto",
161-
"//google/api:resource_proto",
162-
"//google/rpc:status_proto",
163-
"@com_google_protobuf//:wrappers_proto",
164-
],
165-
)
166-
167-
py_proto_library(
168-
name = "bigtable_py_proto",
169-
plugin = "@protoc_docs_plugin//:docs_plugin",
170-
deps = [":bigtable_moved_proto"],
171-
)
172-
173-
py_grpc_library(
174-
name = "bigtable_py_grpc",
175-
srcs = [":bigtable_moved_proto"],
176-
deps = [":bigtable_py_proto"],
146+
"py_gapic_assembly_pkg",
147+
"py_gapic_library",
177148
)
178149

179150
py_gapic_library(
180151
name = "bigtable_py_gapic",
181-
src = ":bigtable_proto_with_info",
182-
gapic_yaml = "bigtable_gapic.yaml",
183-
package = "google.bigtable.v2",
184-
service_yaml = "bigtable_v2.yaml",
185-
deps = [
186-
":bigtable_py_grpc",
187-
":bigtable_py_proto",
188-
],
152+
srcs = [":bigtable_proto"],
153+
grpc_service_config = "bigtable_grpc_service_config.json",
154+
opt_args = ["python-gapic-namespace=google.cloud"],
189155
)
190156

191-
# Open Source Packages
192157
py_gapic_assembly_pkg(
193158
name = "bigtable-v2-py",
194159
deps = [
195160
":bigtable_py_gapic",
196-
":bigtable_py_grpc",
197-
":bigtable_py_proto",
198161
],
199162
)
200163

0 commit comments

Comments
 (0)