Skip to content

Commit

Permalink
chore: migrate bigtable to the Python microgenerator
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 356992836
  • Loading branch information
Google APIs authored and copybara-github committed Feb 11, 2021
1 parent dd89b0c commit 1e0c741
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 90 deletions.
55 changes: 7 additions & 48 deletions google/bigtable/admin/v2/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -157,66 +157,25 @@ go_gapic_assembly_pkg(

##############################################################################
# Python
# DO NOT OVERRIDE with autogenerated rules if NOT migrated to Python Microgen
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
py_gapic_assembly_pkg = "py_gapic_assembly_pkg_legacy",
py_gapic_library = "py_gapic_library_legacy",
)

moved_proto_library(
name = "admin_moved_proto",
srcs = [":admin_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/iam/v1:iam_policy_proto",
"//google/iam/v1:policy_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

py_proto_library(
name = "admin_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":admin_moved_proto"],
)

py_grpc_library(
name = "admin_py_grpc",
srcs = [":admin_moved_proto"],
deps = [":admin_py_proto"],
"py_gapic_assembly_pkg",
"py_gapic_library",
)

py_gapic_library(
name = "admin_py_gapic",
src = ":admin_proto_with_info",
gapic_yaml = "bigtableadmin_gapic.yaml",
package = "google.bigtable.admin.v2",
service_yaml = "bigtableadmin_v2.yaml",
deps = [
":admin_py_grpc",
":admin_py_proto",
],
name = "bigtable_admin_py_gapic",
srcs = [":admin_proto"],
grpc_service_config = "bigtableadmin_grpc_service_config.json",
opt_args = ["python-gapic-namespace=google.cloud", "python-gapic-name=bigtable_admin"],
)

# Open Source Packages
py_gapic_assembly_pkg(
name = "bigtable-admin-v2-py",
deps = [
":admin_py_gapic",
":admin_py_grpc",
":admin_py_proto",
":bigtable_admin_py_gapic",
],
)

Expand Down
47 changes: 5 additions & 42 deletions google/bigtable/v2/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -140,61 +140,24 @@ go_gapic_assembly_pkg(

##############################################################################
# Python
# DO NOT OVERRIDE with autogenerated rules if NOT migrated to Python Microgen
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
py_gapic_assembly_pkg = "py_gapic_assembly_pkg_legacy",
py_gapic_library = "py_gapic_library_legacy",
)

moved_proto_library(
name = "bigtable_moved_proto",
srcs = [":bigtable_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/rpc:status_proto",
"@com_google_protobuf//:wrappers_proto",
],
)

py_proto_library(
name = "bigtable_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":bigtable_moved_proto"],
)

py_grpc_library(
name = "bigtable_py_grpc",
srcs = [":bigtable_moved_proto"],
deps = [":bigtable_py_proto"],
"py_gapic_assembly_pkg",
"py_gapic_library",
)

py_gapic_library(
name = "bigtable_py_gapic",
src = ":bigtable_proto_with_info",
gapic_yaml = "bigtable_gapic.yaml",
package = "google.bigtable.v2",
service_yaml = "bigtable_v2.yaml",
deps = [
":bigtable_py_grpc",
":bigtable_py_proto",
],
srcs = [":bigtable_proto"],
grpc_service_config = "bigtable_grpc_service_config.json",
opt_args = ["python-gapic-namespace=google.cloud"],
)

# Open Source Packages
py_gapic_assembly_pkg(
name = "bigtable-v2-py",
deps = [
":bigtable_py_gapic",
":bigtable_py_grpc",
":bigtable_py_proto",
],
)

Expand Down

0 comments on commit 1e0c741

Please sign in to comment.