2025-01-10 11:35:44 +01:00
|
|
|
# Copyright 2010-2025 Google LLC
|
2024-01-22 17:53:57 +01:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2022-12-16 17:06:11 +01:00
|
|
|
load("@pip_deps//:requirements.bzl", "requirement")
|
2025-07-23 09:05:10 +00:00
|
|
|
load("@rules_python//python:py_library.bzl", "py_library")
|
|
|
|
|
load("@rules_python//python:py_test.bzl", "py_test")
|
2024-01-22 17:53:57 +01:00
|
|
|
|
|
|
|
|
package(default_visibility = ["//ortools/math_opt:__subpackages__"])
|
|
|
|
|
|
|
|
|
|
py_library(
|
|
|
|
|
name = "compare_proto",
|
|
|
|
|
testonly = 1,
|
|
|
|
|
srcs = ["compare_proto.py"],
|
|
|
|
|
deps = [
|
2022-12-16 17:06:11 +01:00
|
|
|
requirement("absl-py"),
|
2024-01-22 17:53:57 +01:00
|
|
|
"//ortools/math_opt/python:normalize",
|
2025-05-20 22:50:51 +02:00
|
|
|
"@protobuf//:protobuf_python",
|
2024-01-22 17:53:57 +01:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-16 17:06:11 +01:00
|
|
|
py_test(
|
|
|
|
|
name = "compare_proto_test",
|
|
|
|
|
srcs = ["compare_proto_test.py"],
|
|
|
|
|
deps = [
|
|
|
|
|
":compare_proto",
|
|
|
|
|
requirement("absl-py"),
|
|
|
|
|
"//ortools/math_opt:model_py_pb2",
|
|
|
|
|
"//ortools/math_opt/python:normalize",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2024-01-22 17:53:57 +01:00
|
|
|
py_library(
|
|
|
|
|
name = "proto_matcher",
|
|
|
|
|
testonly = 1,
|
|
|
|
|
srcs = ["proto_matcher.py"],
|
|
|
|
|
deps = [
|
|
|
|
|
"//ortools/math_opt/python:normalize",
|
2025-05-20 22:50:51 +02:00
|
|
|
"@protobuf//:protobuf_python",
|
2024-01-22 17:53:57 +01:00
|
|
|
],
|
|
|
|
|
)
|
2022-12-16 17:06:11 +01:00
|
|
|
|
|
|
|
|
py_test(
|
|
|
|
|
name = "proto_matcher_test",
|
|
|
|
|
srcs = ["proto_matcher_test.py"],
|
|
|
|
|
deps = [
|
|
|
|
|
":proto_matcher",
|
|
|
|
|
requirement("absl-py"),
|
|
|
|
|
"//ortools/math_opt:model_update_py_pb2",
|
|
|
|
|
"//ortools/math_opt:sparse_containers_py_pb2",
|
|
|
|
|
],
|
|
|
|
|
)
|