Move generic packages from frc971/analysis to aos
To eliminate a dependency of aos on frc971.
Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: Ic4a8f75da29f8e8c6675d96f02824cd08a9b99be
diff --git a/frc971/analysis/BUILD b/frc971/analysis/BUILD
index 93f50f4..b179ad9 100644
--- a/frc971/analysis/BUILD
+++ b/frc971/analysis/BUILD
@@ -1,37 +1,7 @@
-load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
-load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
-load("//aos:config.bzl", "aos_config")
package(default_visibility = ["//visibility:public"])
-cc_binary(
- name = "py_log_reader.so",
- srcs = ["py_log_reader.cc"],
- linkshared = True,
- target_compatible_with = ["@platforms//os:linux"],
- deps = [
- "//aos:configuration",
- "//aos:json_to_flatbuffer",
- "//aos/events:shm_event_loop",
- "//aos/events:simulated_event_loop",
- "//aos/events/logging:log_reader",
- "//third_party/python",
- "@com_github_google_glog//:glog",
- ],
-)
-
-py_test(
- name = "log_reader_test",
- srcs = ["log_reader_test.py"],
- data = [
- ":py_log_reader.so",
- "@sample_logfile//file",
- ],
- target_compatible_with = ["@platforms//os:linux"],
- deps = ["//aos:configuration_fbs_python"],
-)
-
ts_project(
name = "plot_index",
srcs = ["plot_index.ts"],
@@ -73,15 +43,6 @@
],
)
-genrule(
- name = "copy_css",
- srcs = [
- "//aos/network/www:styles.css",
- ],
- outs = ["styles.css"],
- cmd = "cp $< $@",
-)
-
filegroup(
name = "plotter_files",
srcs = [
@@ -112,67 +73,13 @@
target_compatible_with = ["@platforms//os:linux"],
)
-static_flatbuffer(
- name = "plot_data_fbs",
+genrule(
+ name = "copy_css",
srcs = [
- "plot_data.fbs",
+ "//aos/network/www:styles.css",
],
- target_compatible_with = ["@platforms//os:linux"],
-)
-
-flatbuffer_ts_library(
- name = "plot_data_ts_fbs",
- srcs = [
- "plot_data.fbs",
- ],
- target_compatible_with = ["@platforms//os:linux"],
-)
-
-ts_project(
- name = "plot_data_utils",
- srcs = ["plot_data_utils.ts"],
- visibility = ["//visibility:public"],
- deps = [
- ":plot_data_ts_fbs",
- "//aos:configuration_ts_fbs",
- "//aos/network/www:aos_plotter",
- "//aos/network/www:plotter",
- "//aos/network/www:proxy",
- "@com_github_google_flatbuffers//reflection:reflection_ts_fbs",
- "@com_github_google_flatbuffers//ts:flatbuffers_ts",
- ],
-)
-
-aos_config(
- name = "plotter",
- src = "plotter_config.json",
- flatbuffers = [":plot_data_fbs"],
- target_compatible_with = ["@platforms//os:linux"],
- deps = ["//aos/events:aos_config"],
-)
-
-cc_library(
- name = "in_process_plotter",
- srcs = ["in_process_plotter.cc"],
- hdrs = ["in_process_plotter.h"],
- data = [
- ":plotter",
- "//frc971/analysis/cpp_plot:cpp_plot_files",
- ],
- deps = [
- ":plot_data_fbs",
- "//aos/events:simulated_event_loop",
- "//aos/network:web_proxy",
- ],
-)
-
-cc_binary(
- name = "in_process_plotter_demo",
- srcs = ["in_process_plotter_demo.cc"],
- deps = [
- ":in_process_plotter",
- "//aos:init",
- ],
+ outs = ["styles.css"],
+ cmd = "cp $< $@",
)
cc_binary(
@@ -204,18 +111,6 @@
],
)
-cc_binary(
- name = "local_foxglove",
- srcs = ["local_foxglove.cc"],
- data = ["@foxglove_studio"],
- deps = [
- "//aos:init",
- "//aos/network:gen_embedded",
- "//aos/seasocks:seasocks_logger",
- "//third_party/seasocks",
- ],
-)
-
py_binary(
name = "trim_and_plot_foxglove",
srcs = ["trim_and_plot_foxglove.py"],