Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions dgf/src/util/BUILD
Original file line number Diff line number Diff line change
@@ -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")

Expand Down Expand Up @@ -47,6 +47,7 @@ py_library(
py_library(
name = "proto",
srcs = ["proto.py"],
type_checking = True,
deps = [
":filesystem",
],
Expand All @@ -55,6 +56,7 @@ py_library(
py_library(
name = "filesystem",
srcs = ["filesystem.py"],
type_checking = True,
deps = [
# absl/logging dep,
# etils/epath dep,
Expand All @@ -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",
],
Expand All @@ -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,
Expand All @@ -87,6 +91,7 @@ py_library(
py_library(
name = "json",
srcs = ["json.py"],
type_checking = True,
deps = [
":filesystem",
],
Expand Down Expand Up @@ -162,6 +167,7 @@ cc_library(
py_library(
name = "util_py",
srcs = ["util.py"],
type_checking = True,
deps = [
":log",
# numpy dep,
Expand All @@ -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,
],
Expand All @@ -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",
Expand Down Expand Up @@ -236,6 +245,7 @@ bzl_library(
py_library(
name = "dataclass_registry",
srcs = ["dataclass_registry.py"],
type_checking = True,
deps = [
# dataclasses_json dep,
],
Expand All @@ -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",
Expand All @@ -261,6 +272,7 @@ py_test(
py_test(
name = "shard_test",
srcs = ["shard_test.py"],
type_checking = True,
deps = [
":shard",
# absl/testing:absltest dep,
Expand All @@ -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,
Expand All @@ -282,6 +295,7 @@ py_test(
py_test(
name = "json_test",
srcs = ["json_test.py"],
type_checking = True,
deps = [
":json",
# absl/testing:absltest dep,
Expand All @@ -295,6 +309,7 @@ py_test(
"manual",
"notap",
],
type_checking = True,
deps = [
":filesystem",
# absl/flags dep,
Expand All @@ -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",
Expand Down Expand Up @@ -348,6 +364,7 @@ cc_test(
py_test(
name = "filesystem_test",
srcs = ["filesystem_test.py"],
type_checking = True,
deps = [
":filesystem",
# absl/testing:absltest dep,
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -392,6 +412,7 @@ py_test(
py_test(
name = "log_test",
srcs = ["log_test.py"],
type_checking = True,
deps = [
":log",
# absl/testing:absltest dep,
Expand All @@ -401,6 +422,7 @@ py_test(
py_test(
name = "temporal_test",
srcs = ["temporal_test.py"],
type_checking = True,
deps = [
":temporal",
# absl/testing:absltest dep,
Expand All @@ -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,
Expand Down
15 changes: 14 additions & 1 deletion dgf/src/util/weak_dep/BUILD
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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",
],
Expand All @@ -66,6 +73,7 @@ py_library(
py_library(
name = "weak_dep_aiplatform",
srcs = ["weak_dep_aiplatform.py"],
type_checking = True,
deps = [
":weak_dep_base",
],
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion dgf/src/validate/BUILD
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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",
Expand All @@ -34,6 +36,7 @@ py_library(
py_library(
name = "graph_snapshots",
srcs = ["graph_snapshots.py"],
type_checking = True,
deps = [
":in_memory_graph",
":validate",
Expand All @@ -51,6 +54,7 @@ py_library(
py_test(
name = "validate_test",
srcs = ["validate_test.py"],
type_checking = True,
deps = [
":validate",
# absl/testing:absltest dep,
Expand All @@ -61,6 +65,7 @@ py_test(
py_test(
name = "graph_snapshots_test",
srcs = ["graph_snapshots_test.py"],
type_checking = True,
deps = [
":graph_snapshots",
":validate",
Expand All @@ -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",
Expand Down
Loading