mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[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:
@@ -1,9 +1,9 @@
|
||||
load("@allwpilib_pip_deps//:requirements.bzl", "requirement")
|
||||
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
|
||||
load("//robotpyExamples:example_projects.bzl", "PROJECTS")
|
||||
load("//robotpyExamples:example_projects.bzl", "EXAMPLE_PROJECTS", "SNIPPET_PROJECTS")
|
||||
|
||||
def define_examples():
|
||||
for example_folder in PROJECTS:
|
||||
def _define_robot_project(projects, project_type):
|
||||
for example_folder in projects:
|
||||
base_name = example_folder.replace("/", "_")
|
||||
common_kwargs = dict(
|
||||
srcs = [":robotpy_entry_point.py"],
|
||||
@@ -42,3 +42,9 @@ def define_examples():
|
||||
deps = common_deps + ["//simulation/halsim_gui:robotpy-halsim-gui"],
|
||||
**common_kwargs
|
||||
)
|
||||
|
||||
def define_examples():
|
||||
_define_robot_project(EXAMPLE_PROJECTS, "example")
|
||||
|
||||
def define_snippets():
|
||||
_define_robot_project(SNIPPET_PROJECTS, "snippet")
|
||||
|
||||
Reference in New Issue
Block a user