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
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Needed to work with ZetaSQL dependency.
# Zetasql is removed.
# This is a candidate for removal
build --cxxopt="-std=c++17"

# Needed to avoid zetasql proto error.
# Zetasql is removed.
# This is a candidate for removal
build --protocopt=--experimental_allow_proto3_optional

# icu@: In create_linking_context: in call to create_linking_context(),
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
- name: Install built wheel
shell: bash
run: |
pip install dist/*.whl['test']
PYTHON_VERSION_TAG="cp$(echo ${{ matrix.python-version }} | sed 's/\.//')"
WHEEL_FILE=$(ls dist/*${PYTHON_VERSION_TAG}*.whl)
pip install "${WHEEL_FILE}[test]"

- name: Run Test
run: |
Expand Down
62 changes: 10 additions & 52 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,6 @@ http_archive(
],
)

# Needed by abseil-py by zetasql.
http_archive(
name = "six_archive",
build_file = "//third_party:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
strip_prefix = "six-1.10.0",
urls = [
"http://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()
Expand Down Expand Up @@ -112,6 +100,16 @@ http_archive(
url = "https://github.com/abseil/abseil-cpp/archive/%s.tar.gz" % COM_GOOGLE_ABSL_COMMIT,
)


# re2 required for google tests
http_archive(
name = "com_googlesource_code_re2",
# build_file = "//third_party:re2.BUILD",
sha256 = "b90430b2a9240df4459108b3e291be80ae92c68a47bc06ef2dc419c5724de061",
strip_prefix = "re2-a276a8c738735a0fe45a6ee590fe2df69bcf4502",
urls = ["https://github.com/google/re2/archive/a276a8c738735a0fe45a6ee590fe2df69bcf4502.tar.gz"],
)

# Will be loaded by workspace.bzl from head
# TFMD_COMMIT = "404805761e614561cceedc429e67c357c62be26d" # 1.17.1

Expand Down Expand Up @@ -218,46 +216,6 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") #, "go_repository")

gazelle_dependencies()

################################################################################
# ZetaSQL #
################################################################################

ZETASQL_COMMIT = "a516c6b26d183efc4f56293256bba92e243b7a61" # 11/01/2024

http_archive(
name = "com_google_zetasql",
patch_args = ["-p1"],
patches = ["//third_party:zetasql.patch"],
sha256 = "1afc2210d4aad371eff0a6bfdd8417ba99e02183a35dff167af2fa6097643f26",
strip_prefix = "zetasql-%s" % ZETASQL_COMMIT,
urls = ["https://github.com/google/zetasql/archive/%s.tar.gz" % ZETASQL_COMMIT],
)

load("@com_google_zetasql//bazel:zetasql_deps_step_1.bzl", "zetasql_deps_step_1")

zetasql_deps_step_1()

load("@com_google_zetasql//bazel:zetasql_deps_step_2.bzl", "zetasql_deps_step_2")

zetasql_deps_step_2(
analyzer_deps = True,
evaluator_deps = True,
java_deps = False,
testing_deps = False,
tools_deps = False,
)

# No need to run zetasql_deps_step_3 and zetasql_deps_step_4 since all necessary dependencies are
# already installed.

# load("@com_google_zetasql//bazel:zetasql_deps_step_3.bzl", "zetasql_deps_step_3")

# zetasql_deps_step_3()

# load("@com_google_zetasql//bazel:zetasql_deps_step_4.bzl", "zetasql_deps_step_4")

# zetasql_deps_step_4()

_PLATFORMS_VERSION = "0.0.6"

http_archive(
Expand Down
1 change: 0 additions & 1 deletion tensorflow_data_validation/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ sh_binary(
srcs = ["move_generated_files.sh"],
data = select({
"//conditions:default": [
"//tensorflow_data_validation/anomalies/proto:custom_validation_config_proto_py_pb2",
"//tensorflow_data_validation/anomalies/proto:validation_config_proto_py_pb2",
"//tensorflow_data_validation/anomalies/proto:validation_metadata_proto_py_pb2",
"//tensorflow_data_validation/pywrap:tensorflow_data_validation_extension.so",
Expand Down
32 changes: 0 additions & 32 deletions tensorflow_data_validation/anomalies/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -425,38 +425,6 @@ cc_test(
],
)

cc_library(
name = "custom_validation",
srcs = ["custom_validation.cc"],
hdrs = ["custom_validation.h"],
deps = [
":path",
":schema",
":status_util",
"//tensorflow_data_validation/anomalies/proto:custom_validation_config_proto_cc_pb2",
"@com_github_tensorflow_metadata//tensorflow_metadata/proto/v0:metadata_v0_proto_cc_pb2",
"@com_github_tfx_bsl//tfx_bsl/cc/statistics:sql_util",
"@com_google_absl//absl/base:log_severity",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
],
)

cc_test(
name = "custom_validation_test",
srcs = ["custom_validation_test.cc"],
deps = [
":custom_validation",
":test_util",
"@com_github_tensorflow_metadata//tensorflow_metadata/proto/v0:metadata_v0_proto_cc_pb2",
"@com_google_absl//absl/types:optional",
"@com_google_googletest//:gtest_main",
],
)

cc_library(
name = "telemetry",
srcs = ["telemetry.cc"],
Expand Down
Loading