Add python plotter using py_log_reader
We don't have a convenient text-to-flatbuffer converter for Python, so
I've just used protobuf for defining my configs. Since none of this
actually ends up getting serialized, removing the protobuf at a later
date and swapping it for a flatbuffer will not break any sort of
backwards compatibility.
Change-Id: I9ef234b60e8da57808bb68e1f037832b3448d2e5
diff --git a/frc971/analysis/BUILD b/frc971/analysis/BUILD
index 87a64ee..82aca97 100644
--- a/frc971/analysis/BUILD
+++ b/frc971/analysis/BUILD
@@ -1,5 +1,7 @@
package(default_visibility = ["//visibility:public"])
+load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
+
py_binary(
name = "plot_action",
srcs = [
@@ -48,3 +50,22 @@
restricted_to = ["//tools:k8"],
deps = ["//aos:configuration_fbs_python"],
)
+
+py_proto_library(
+ name = "plot_config_proto",
+ srcs = ["plot_config.proto"],
+)
+
+py_binary(
+ name = "plot",
+ srcs = ["plot.py"],
+ data = [
+ ":py_log_reader.so",
+ ] + glob(["plot_configs/**"]),
+ restricted_to = ["//tools:k8"],
+ deps = [
+ ":plot_config_proto",
+ ":python_init",
+ "@matplotlib_repo//:matplotlib3",
+ ],
+)