[robotpy][examples] Split examples and snippets (#8944)

This also updates the bazel scripts to behave more like the C++ and Java
examples, and updates the copybara scripts to be able to sync up
`mostrobotpy`
This commit is contained in:
PJ Reiniger
2026-06-03 22:43:16 -04:00
committed by GitHub
parent a734275cc5
commit dca59147e1
134 changed files with 111 additions and 80 deletions

View File

@@ -2,7 +2,7 @@ load("@allwpilib_pip_deps//:requirements.bzl", "requirement")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file")
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary")
load(":define_examples.bzl", "define_examples")
load(":define_examples.bzl", "define_examples", "define_snippets")
py_binary(
name = "generate_bazel_files",
@@ -22,7 +22,8 @@ cmd = "$(locations :generate_bazel_files) $(OUTS)"
genrule(
name = "generate_bazel_files_rule",
srcs = [
"examples.toml",
"examples/examples.toml",
"snippets/snippets.toml",
],
outs = ["gen/example_projects.bzl"],
cmd = cmd,
@@ -45,3 +46,5 @@ py_console_script_binary(
)
define_examples()
define_snippets()