[go: nahoru, domu]

Skip to content

Commit

Permalink
In BUILD files, have a separate load() line for each loaded symbol
Browse files Browse the repository at this point in the history
and prevent autoformatting from changing that.

PiperOrigin-RevId: 620824711
  • Loading branch information
arnoegw authored and tensorflower-gardener committed Apr 1, 2024
1 parent 605b552 commit 3c65d57
Show file tree
Hide file tree
Showing 28 changed files with 177 additions and 24 deletions.
4 changes: 4 additions & 0 deletions tensorflow_gnn/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_license//rules:license.bzl", "license")

package(
Expand Down
7 changes: 6 additions & 1 deletion tensorflow_gnn/data/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

licenses(["notice"])

Expand Down
2 changes: 2 additions & 0 deletions tensorflow_gnn/experimental/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

licenses(["notice"])
Expand Down
9 changes: 9 additions & 0 deletions tensorflow_gnn/experimental/datasets/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "py_strict_test")

package(
default_applicable_licenses = ["//tensorflow_gnn:license"],
default_visibility = ["//visibility:private"],
)

pytype_strict_library(
name = "pyg_adapter",
srcs = ["pyg_adapter.py"],
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/experimental/sampler/beam/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
# Placeholder: load py_binary
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

licenses(["notice"])

Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/experimental/sampler/proto/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites some of these load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_proto//proto:defs.bzl", "proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_python//python:proto.bzl", "py_proto_library")

package(default_visibility = ["//visibility:public"])
Expand Down
12 changes: 11 additions & 1 deletion tensorflow_gnn/graph/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_library", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/keras/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/keras/layers/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
11 changes: 11 additions & 0 deletions tensorflow_gnn/models/contrastive_losses/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "distribute_py_test")

package(
default_applicable_licenses = ["//tensorflow_gnn:license"],
default_visibility = ["//visibility:private"],
)

licenses(["notice"])

package_group(name = "users")
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/models/gat_v2/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/models/gcn/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/models/graph_sage/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/models/hgt/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/models/mt_albis/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/models/multi_head_attention/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/models/vanilla_mpnn/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
10 changes: 7 additions & 3 deletions tensorflow_gnn/proto/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Copybara rewrites some of these load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_proto//proto:defs.bzl", "proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_python//python:proto.bzl", "py_proto_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:proto.bzl", "py_proto_library")

py_library(
name = "proto",
srcs = ["__init__.py"],
Expand Down
6 changes: 6 additions & 0 deletions tensorflow_gnn/runner/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "py_strict_test")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "distribute_py_test")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/runner/examples/ogbn/mag/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_binary", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_binary")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "tf_py_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/runner/input/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "py_strict_test")

licenses(["notice"])
Expand Down
4 changes: 4 additions & 0 deletions tensorflow_gnn/runner/tasks/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "py_strict_test")

licenses(["notice"])
Expand Down
2 changes: 2 additions & 0 deletions tensorflow_gnn/runner/trainers/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

licenses(["notice"])
Expand Down
9 changes: 8 additions & 1 deletion tensorflow_gnn/runner/utils/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_binary", "pytype_strict_library")
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_binary")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "py_strict_test")

licenses(["notice"])
Expand Down
10 changes: 7 additions & 3 deletions tensorflow_gnn/sampler/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Copybara rewrites some of these load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_proto//proto:defs.bzl", "proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_python//python:proto.bzl", "py_proto_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:proto.bzl", "py_proto_library")

proto_library(
name = "sampling_spec_proto",
srcs = ["sampling_spec.proto"],
Expand Down
15 changes: 11 additions & 4 deletions tensorflow_gnn/sampler/unsupported/BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

# Copybara rewrites some of these load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_proto//proto:defs.bzl", "proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_python//python:proto.bzl", "py_proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")


package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

proto_library(
name = "subgraph_proto",
srcs = ["subgraph.proto"],
Expand Down
11 changes: 7 additions & 4 deletions tensorflow_gnn/tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Copybara rewrites some of these load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_proto//proto:defs.bzl", "proto_library")

# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@rules_python//python:proto.bzl", "py_proto_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_python//python:proto.bzl", "py_proto_library")
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_contrib_test")

proto_library(
name = "sampled_stats_proto",
srcs = ["sampled_stats.proto"],
Expand Down
2 changes: 2 additions & 0 deletions tensorflow_gnn/utils/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copybara rewrites load() statements back and forth; do not reformat.
# buildifier: disable=out-of-order-load, disable=same-origin-load
load("@tensorflow_gnn//tensorflow_gnn:tensorflow_gnn.bzl", "pytype_strict_library")

licenses(["notice"])
Expand Down

0 comments on commit 3c65d57

Please sign in to comment.