diff --git a/dgf/src/util/BUILD b/dgf/src/util/BUILD index b16d69ef..220c19b0 100644 --- a/dgf/src/util/BUILD +++ b/dgf/src/util/BUILD @@ -1,7 +1,7 @@ -load("@rules_python//python:py_library.bzl", "py_library") -load("@rules_python//python:py_test.bzl", "py_test") load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_cc//cc:cc_test.bzl", "cc_test") +load("//third_party/bazel_rules/rules_python/python:py_library.bzl", "py_library") +load("@rules_python//python:py_test.bzl", "py_test") load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension") load("@nanobind_bazel//:build_defs.bzl", "nanobind_library") @@ -47,6 +47,7 @@ py_library( py_library( name = "proto", srcs = ["proto.py"], + type_checking = True, deps = [ ":filesystem", ], @@ -55,6 +56,7 @@ py_library( py_library( name = "filesystem", srcs = ["filesystem.py"], + type_checking = True, deps = [ # absl/logging dep, # etils/epath dep, @@ -65,6 +67,7 @@ py_library( py_library( name = "shard", srcs = ["shard.py"], + type_checking = True, deps = [ "//dgf/src/util/weak_dep:weak_dep_tensorflow", ], @@ -73,6 +76,7 @@ py_library( py_library( name = "test_util", srcs = ["test_util.py"], + type_checking = True, deps = [ # absl/flags dep, # absl/testing:absltest dep, @@ -87,6 +91,7 @@ py_library( py_library( name = "json", srcs = ["json.py"], + type_checking = True, deps = [ ":filesystem", ], @@ -162,6 +167,7 @@ cc_library( py_library( name = "util_py", srcs = ["util.py"], + type_checking = True, deps = [ ":log", # numpy dep, @@ -171,11 +177,13 @@ py_library( py_library( name = "html_util", srcs = ["html_util.py"], + type_checking = True, ) py_library( name = "log", srcs = ["log.py"], + type_checking = True, deps = [ # absl/logging dep, ], @@ -184,6 +192,7 @@ py_library( py_library( name = "temporal", srcs = ["temporal.py"], + type_checking = True, deps = [ "//dgf/src/data:in_memory_graph", "//dgf/src/data:schema", @@ -236,6 +245,7 @@ bzl_library( py_library( name = "dataclass_registry", srcs = ["dataclass_registry.py"], + type_checking = True, deps = [ # dataclasses_json dep, ], @@ -247,6 +257,7 @@ py_library( py_test( name = "gen_test_graph_test", srcs = ["gen_test_graph_test.py"], + type_checking = True, deps = [ ":gen_test_graph", ":test_util", @@ -261,6 +272,7 @@ py_test( py_test( name = "shard_test", srcs = ["shard_test.py"], + type_checking = True, deps = [ ":shard", # absl/testing:absltest dep, @@ -272,6 +284,7 @@ py_test( name = "test_util_test", srcs = ["test_util_test.py"], data = ["//test_data"], + type_checking = True, deps = [ ":test_util", # absl/testing:absltest dep, @@ -282,6 +295,7 @@ py_test( py_test( name = "json_test", srcs = ["json_test.py"], + type_checking = True, deps = [ ":json", # absl/testing:absltest dep, @@ -295,6 +309,7 @@ py_test( "manual", "notap", ], + type_checking = True, deps = [ ":filesystem", # absl/flags dep, @@ -318,6 +333,7 @@ cc_test( py_test( name = "nanobind_util_test", srcs = ["nanobind_util_test.py"], + type_checking = True, deps = [ ":nanobind_util_test_ext", ":test_util", @@ -348,6 +364,7 @@ cc_test( py_test( name = "filesystem_test", srcs = ["filesystem_test.py"], + type_checking = True, deps = [ ":filesystem", # absl/testing:absltest dep, @@ -358,6 +375,7 @@ py_test( name = "util_py_test", srcs = ["util_test.py"], main = "util_test.py", + type_checking = True, deps = [ ":util_py", # absl/testing:absltest dep, @@ -369,6 +387,7 @@ py_test( py_test( name = "dataclass_registry_test", srcs = ["dataclass_registry_test.py"], + type_checking = True, deps = [ ":dataclass_registry", ":test_util", @@ -381,6 +400,7 @@ py_test( py_test( name = "util_ext_test", srcs = ["util_ext_test.py"], + type_checking = True, deps = [ ":util_ext", # absl/testing:absltest dep, @@ -392,6 +412,7 @@ py_test( py_test( name = "log_test", srcs = ["log_test.py"], + type_checking = True, deps = [ ":log", # absl/testing:absltest dep, @@ -401,6 +422,7 @@ py_test( py_test( name = "temporal_test", srcs = ["temporal_test.py"], + type_checking = True, deps = [ ":temporal", # absl/testing:absltest dep, @@ -413,11 +435,13 @@ py_test( py_library( name = "options", srcs = ["options.py"], + type_checking = True, ) py_test( name = "options_test", srcs = ["options_test.py"], + type_checking = True, deps = [ ":options", # absl/testing:absltest dep, diff --git a/dgf/src/util/weak_dep/BUILD b/dgf/src/util/weak_dep/BUILD index dfb83ed2..23cf5003 100644 --- a/dgf/src/util/weak_dep/BUILD +++ b/dgf/src/util/weak_dep/BUILD @@ -1,4 +1,4 @@ -load("@rules_python//python:py_library.bzl", "py_library") +load("//third_party/bazel_rules/rules_python/python:py_library.bzl", "py_library") load("@rules_python//python:py_test.bzl", "py_test") package( @@ -11,11 +11,13 @@ package( py_library( name = "weak_dep_base", srcs = ["base.py"], + type_checking = True, ) py_library( name = "weak_dep_tensorflow", srcs = ["weak_dep_tensorflow.py"], + type_checking = True, deps = [ ":weak_dep_base", # tensorflow dep, # build_cleaner: keep @@ -25,6 +27,7 @@ py_library( py_library( name = "weak_dep_apache_beam", srcs = ["weak_dep_apache_beam.py"], + type_checking = True, deps = [ ":weak_dep_base", # apache_beam dep, # build_cleaner: keep @@ -34,6 +37,7 @@ py_library( py_library( name = "weak_dep_tensorflow_gnn", srcs = ["weak_dep_tensorflow_gnn.py"], + type_checking = True, deps = [ ":weak_dep_base", # tensorflow_gnn dep, # build_cleaner: keep @@ -43,6 +47,7 @@ py_library( py_library( name = "weak_dep_clu", srcs = ["weak_dep_clu.py"], + type_checking = True, deps = [ ":weak_dep_base", # clu/metric_writers dep, # build_cleaner: keep @@ -52,12 +57,14 @@ py_library( py_library( name = "weak_dep_ogb", srcs = ["weak_dep_ogb.py"], + type_checking = True, deps = [":weak_dep_base"], ) py_library( name = "weak_dep_bagz", srcs = ["weak_dep_bagz.py"], + type_checking = True, deps = [ ":weak_dep_base", ], @@ -66,6 +73,7 @@ py_library( py_library( name = "weak_dep_aiplatform", srcs = ["weak_dep_aiplatform.py"], + type_checking = True, deps = [ ":weak_dep_base", ], @@ -74,6 +82,7 @@ py_library( py_library( name = "weak_dep_tensorflow_hub", srcs = ["weak_dep_tensorflow_hub.py"], + type_checking = True, deps = [ ":weak_dep_base", # tensorflow_hub dep, # build_cleaner: keep @@ -83,6 +92,7 @@ py_library( py_library( name = "weak_dep_tensorflow_text", srcs = ["weak_dep_tensorflow_text.py"], + type_checking = True, deps = [ ":weak_dep_base", # tensorflow_text dep, # build_cleaner: keep @@ -92,6 +102,7 @@ py_library( py_library( name = "weak_dep_keras_hub", srcs = ["weak_dep_keras_hub.py"], + type_checking = True, deps = [ ":weak_dep_base", # keras_hub dep, # build_cleaner: keep @@ -101,11 +112,13 @@ py_library( py_library( name = "weak_dep", srcs = ["__init__.py"], + type_checking = True, ) py_test( name = "weak_dep_test", srcs = ["weak_dep_test.py"], + type_checking = True, deps = [ ":weak_dep_base", # absl/testing:absltest dep, diff --git a/dgf/src/validate/BUILD b/dgf/src/validate/BUILD index aaad4a6c..98c6cf13 100644 --- a/dgf/src/validate/BUILD +++ b/dgf/src/validate/BUILD @@ -1,4 +1,4 @@ -load("@rules_python//python:py_library.bzl", "py_library") +load("//third_party/bazel_rules/rules_python/python:py_library.bzl", "py_library") load("@rules_python//python:py_test.bzl", "py_test") package( @@ -15,12 +15,14 @@ package( py_library( name = "validate", srcs = ["validate.py"], + type_checking = True, deps = ["//dgf/src/util:log"], ) py_library( name = "in_memory_graph", srcs = ["in_memory_graph.py"], + type_checking = True, deps = [ ":validate", "//dgf/src/analyse:schema", @@ -34,6 +36,7 @@ py_library( py_library( name = "graph_snapshots", srcs = ["graph_snapshots.py"], + type_checking = True, deps = [ ":in_memory_graph", ":validate", @@ -51,6 +54,7 @@ py_library( py_test( name = "validate_test", srcs = ["validate_test.py"], + type_checking = True, deps = [ ":validate", # absl/testing:absltest dep, @@ -61,6 +65,7 @@ py_test( py_test( name = "graph_snapshots_test", srcs = ["graph_snapshots_test.py"], + type_checking = True, deps = [ ":graph_snapshots", ":validate", @@ -79,6 +84,7 @@ py_test( py_test( name = "in_memory_graph_test", srcs = ["in_memory_graph_test.py"], + type_checking = True, deps = [ ":in_memory_graph", ":validate",