diff --git a/copy.bara.sky b/copy.bara.sky index 217eac3d5e..8b6abe94c6 100644 --- a/copy.bara.sky +++ b/copy.bara.sky @@ -175,7 +175,13 @@ def define_mostrobotpy_to_allwpilib(): "examples/robot/**", ], exclude = EXCLUDES) destination_files += glob(["robotpyExamples/**"], exclude = ["robotpyExamples/define_examples.bzl", "robotpyExamples/example_projects.bzl", "robotpyExamples/generate_bazel_files.py", "robotpyExamples/BUILD.bazel"]) - transformations.append(core.move("examples/robot/", "robotpyExamples/")) + transformations.append(core.move("examples/robot/", "robotpyExamples/examples")) + + origin_files += glob([ + "examples/snippets/**", + ], exclude = EXCLUDES) + destination_files += glob(["robotpyExamples/**"], exclude = ["robotpyExamples/define_examples.bzl", "robotpyExamples/example_projects.bzl", "robotpyExamples/generate_bazel_files.py", "robotpyExamples/BUILD.bazel"]) + transformations.append(core.move("examples/snippets/", "robotpyExamples/snippets")) # Some tests seem to fail in mostrobotpy, but don't in allwpilib # We will leave them turned on in allwpilib, and mark them as xfail in mostrobotpy. @@ -189,11 +195,11 @@ def define_mostrobotpy_to_allwpilib(): name = "mostrobotpy_to_allwpilib", origin = git.origin( url = "https://github.com/robotpy/mostrobotpy.git", - ref = "2027", + ref = "main", ), destination = git.destination( url = "https://github.com/OVERRIDE_ME/OVERRIDE_ME", - fetch = "2027", + fetch = "main", push = "copybara_mostrobotpy_to_allwpilib", ), destination_files = destination_files, @@ -226,7 +232,9 @@ def define_allwpilib_to_mostrobotpy(): "robotpyExamples/**", ], exclude = ["robotpyExamples/BUILD.bazel", "robotpyExamples/define_examples.bzl", "robotpyExamples/example_projects.bzl", "robotpyExamples/generate_bazel_files.py"]) destination_files += glob(["examples/robot/**"], exclude = ["examples/robot/.gitignore"]) - transformations.append(core.move("robotpyExamples/", "examples/robot/")) + destination_files += glob(["examples/snippets/**"], exclude = ["examples/snippets/.gitignore"]) + transformations.append(core.move("robotpyExamples/examples", "examples/robot/")) + transformations.append(core.move("robotpyExamples/snippets", "snippets/robot/")) # Some tests seem to fail in mostrobotpy, but don't in allwpilib # We will leave them turned on in allwpilib, and mark them as xfail in mostrobotpy. @@ -240,11 +248,11 @@ def define_allwpilib_to_mostrobotpy(): name = "allwpilib_to_mostrobotpy", origin = git.origin( url = "https://github.com/wpilibsuite/allwpilib.git", - ref = "2027", + ref = "main", ), destination = git.github_destination( url = "https://github.com/OVERRIDE_ME/OVERRIDE_ME", - fetch = "2027", + fetch = "main", push = "copybara_allwpilib_to_mostrobotpy", ), destination_files = destination_files, diff --git a/robotpyExamples/BUILD.bazel b/robotpyExamples/BUILD.bazel index 0ca08dbda9..5b745dcfc6 100644 --- a/robotpyExamples/BUILD.bazel +++ b/robotpyExamples/BUILD.bazel @@ -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() diff --git a/robotpyExamples/define_examples.bzl b/robotpyExamples/define_examples.bzl index 586807d466..d94fd21b3e 100644 --- a/robotpyExamples/define_examples.bzl +++ b/robotpyExamples/define_examples.bzl @@ -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") diff --git a/robotpyExamples/example_projects.bzl b/robotpyExamples/example_projects.bzl index 4d46edf6ed..371f46c3c7 100644 --- a/robotpyExamples/example_projects.bzl +++ b/robotpyExamples/example_projects.bzl @@ -1,51 +1,53 @@ -PROJECTS = [ - "AddressableLED", - "AprilTagsVision", - "ArcadeDrive", - "ArcadeDriveXboxController", - "ArmSimulation", - "CANPDP", - "DifferentialDriveBot", - "DifferentialDrivePoseEstimator", - "DigitalCommunication", - "DriveDistanceOffboard", - "DutyCycleEncoder", - "DutyCycleInput", - "ElevatorExponentialProfile", - "ElevatorExponentialSimulation", - "ElevatorProfiledPID", - "ElevatorSimulation", - "ElevatorTrapezoidProfile", - "Encoder", - "EventLoop", - "FlywheelBangBangController", - "GettingStarted", - "Gyro", - "HatchbotInlined", - "HatchbotTraditional", - "HttpCamera", - "I2CCommunication", - "IntermediateVision", - "MecanumBot", - "MecanumDrive", - "MecanumDrivePoseEstimator", - "Mechanism2d", - "MotorControl", - "QuickVision", - "RapidReactCommandBot", - "RomiReference", - "SelectCommand", - "SimpleDifferentialDriveSimulation", - "Solenoid", - "StateSpaceArm", - "StateSpaceElevator", - "StateSpaceFlywheel", - "StateSpaceFlywheelSysId", - "SwerveBot", - "SwerveDrivePoseEstimator", - "SysId", - "TankDrive", - "TankDriveXboxController", - "UnitTest", - "XrpReference", +EXAMPLE_PROJECTS = [ + "examples/ArcadeDrive", + "examples/ArcadeDriveXboxController", + "examples/ArmSimulation", + "examples/DifferentialDriveBot", + "examples/DifferentialDrivePoseEstimator", + "examples/DriveDistanceOffboard", + "examples/DutyCycleEncoder", + "examples/ElevatorExponentialProfile", + "examples/ElevatorExponentialSimulation", + "examples/ElevatorProfiledPID", + "examples/ElevatorSimulation", + "examples/ElevatorTrapezoidProfile", + "examples/Encoder", + "examples/GettingStarted", + "examples/Gyro", + "examples/HatchbotInlined", + "examples/HatchbotTraditional", + "examples/MecanumBot", + "examples/MecanumDrive", + "examples/MecanumDrivePoseEstimator", + "examples/Mechanism2d", + "examples/RapidReactCommandBot", + "examples/RomiReference", + "examples/SimpleDifferentialDriveSimulation", + "examples/StateSpaceArm", + "examples/StateSpaceElevator", + "examples/StateSpaceFlywheel", + "examples/StateSpaceFlywheelSysId", + "examples/SwerveBot", + "examples/SwerveDrivePoseEstimator", + "examples/SysId", + "examples/TankDrive", + "examples/TankDriveXboxController", + "examples/UnitTest", + "examples/XrpReference", +] +SNIPPET_PROJECTS = [ + "snippets/AddressableLED", + "snippets/AprilTagsVision", + "snippets/CANPDP", + "snippets/DigitalCommunication", + "snippets/DutyCycleInput", + "snippets/EventLoop", + "snippets/FlywheelBangBangController", + "snippets/HttpCamera", + "snippets/I2CCommunication", + "snippets/IntermediateVision", + "snippets/MotorControl", + "snippets/QuickVision", + "snippets/SelectCommand", + "snippets/Solenoid", ] diff --git a/robotpyExamples/ArcadeDrive/robot.py b/robotpyExamples/examples/ArcadeDrive/robot.py similarity index 100% rename from robotpyExamples/ArcadeDrive/robot.py rename to robotpyExamples/examples/ArcadeDrive/robot.py diff --git a/robotpyExamples/ArcadeDriveXboxController/robot.py b/robotpyExamples/examples/ArcadeDriveXboxController/robot.py similarity index 100% rename from robotpyExamples/ArcadeDriveXboxController/robot.py rename to robotpyExamples/examples/ArcadeDriveXboxController/robot.py diff --git a/robotpyExamples/ArmSimulation/constants.py b/robotpyExamples/examples/ArmSimulation/constants.py similarity index 100% rename from robotpyExamples/ArmSimulation/constants.py rename to robotpyExamples/examples/ArmSimulation/constants.py diff --git a/robotpyExamples/ArmSimulation/robot.py b/robotpyExamples/examples/ArmSimulation/robot.py similarity index 100% rename from robotpyExamples/ArmSimulation/robot.py rename to robotpyExamples/examples/ArmSimulation/robot.py diff --git a/robotpyExamples/ArmSimulation/subsystems/arm.py b/robotpyExamples/examples/ArmSimulation/subsystems/arm.py similarity index 100% rename from robotpyExamples/ArmSimulation/subsystems/arm.py rename to robotpyExamples/examples/ArmSimulation/subsystems/arm.py diff --git a/robotpyExamples/DifferentialDriveBot/drivetrain.py b/robotpyExamples/examples/DifferentialDriveBot/drivetrain.py similarity index 100% rename from robotpyExamples/DifferentialDriveBot/drivetrain.py rename to robotpyExamples/examples/DifferentialDriveBot/drivetrain.py diff --git a/robotpyExamples/DifferentialDriveBot/robot.py b/robotpyExamples/examples/DifferentialDriveBot/robot.py similarity index 100% rename from robotpyExamples/DifferentialDriveBot/robot.py rename to robotpyExamples/examples/DifferentialDriveBot/robot.py diff --git a/robotpyExamples/DifferentialDrivePoseEstimator/drivetrain.py b/robotpyExamples/examples/DifferentialDrivePoseEstimator/drivetrain.py similarity index 100% rename from robotpyExamples/DifferentialDrivePoseEstimator/drivetrain.py rename to robotpyExamples/examples/DifferentialDrivePoseEstimator/drivetrain.py diff --git a/robotpyExamples/DifferentialDrivePoseEstimator/exampleglobalmeasurementsensor.py b/robotpyExamples/examples/DifferentialDrivePoseEstimator/exampleglobalmeasurementsensor.py similarity index 100% rename from robotpyExamples/DifferentialDrivePoseEstimator/exampleglobalmeasurementsensor.py rename to robotpyExamples/examples/DifferentialDrivePoseEstimator/exampleglobalmeasurementsensor.py diff --git a/robotpyExamples/DifferentialDrivePoseEstimator/robot.py b/robotpyExamples/examples/DifferentialDrivePoseEstimator/robot.py similarity index 100% rename from robotpyExamples/DifferentialDrivePoseEstimator/robot.py rename to robotpyExamples/examples/DifferentialDrivePoseEstimator/robot.py diff --git a/robotpyExamples/DriveDistanceOffboard/constants.py b/robotpyExamples/examples/DriveDistanceOffboard/constants.py similarity index 100% rename from robotpyExamples/DriveDistanceOffboard/constants.py rename to robotpyExamples/examples/DriveDistanceOffboard/constants.py diff --git a/robotpyExamples/DriveDistanceOffboard/examplesmartmotorcontroller.py b/robotpyExamples/examples/DriveDistanceOffboard/examplesmartmotorcontroller.py similarity index 100% rename from robotpyExamples/DriveDistanceOffboard/examplesmartmotorcontroller.py rename to robotpyExamples/examples/DriveDistanceOffboard/examplesmartmotorcontroller.py diff --git a/robotpyExamples/DriveDistanceOffboard/robot.py b/robotpyExamples/examples/DriveDistanceOffboard/robot.py similarity index 100% rename from robotpyExamples/DriveDistanceOffboard/robot.py rename to robotpyExamples/examples/DriveDistanceOffboard/robot.py diff --git a/robotpyExamples/DriveDistanceOffboard/robotcontainer.py b/robotpyExamples/examples/DriveDistanceOffboard/robotcontainer.py similarity index 100% rename from robotpyExamples/DriveDistanceOffboard/robotcontainer.py rename to robotpyExamples/examples/DriveDistanceOffboard/robotcontainer.py diff --git a/robotpyExamples/DriveDistanceOffboard/subsystems/drivesubsystem.py b/robotpyExamples/examples/DriveDistanceOffboard/subsystems/drivesubsystem.py similarity index 100% rename from robotpyExamples/DriveDistanceOffboard/subsystems/drivesubsystem.py rename to robotpyExamples/examples/DriveDistanceOffboard/subsystems/drivesubsystem.py diff --git a/robotpyExamples/DutyCycleEncoder/robot.py b/robotpyExamples/examples/DutyCycleEncoder/robot.py similarity index 100% rename from robotpyExamples/DutyCycleEncoder/robot.py rename to robotpyExamples/examples/DutyCycleEncoder/robot.py diff --git a/robotpyExamples/ElevatorExponentialProfile/examplesmartmotorcontroller.py b/robotpyExamples/examples/ElevatorExponentialProfile/examplesmartmotorcontroller.py similarity index 100% rename from robotpyExamples/ElevatorExponentialProfile/examplesmartmotorcontroller.py rename to robotpyExamples/examples/ElevatorExponentialProfile/examplesmartmotorcontroller.py diff --git a/robotpyExamples/ElevatorExponentialProfile/robot.py b/robotpyExamples/examples/ElevatorExponentialProfile/robot.py similarity index 100% rename from robotpyExamples/ElevatorExponentialProfile/robot.py rename to robotpyExamples/examples/ElevatorExponentialProfile/robot.py diff --git a/robotpyExamples/ElevatorExponentialSimulation/constants.py b/robotpyExamples/examples/ElevatorExponentialSimulation/constants.py similarity index 100% rename from robotpyExamples/ElevatorExponentialSimulation/constants.py rename to robotpyExamples/examples/ElevatorExponentialSimulation/constants.py diff --git a/robotpyExamples/ElevatorExponentialSimulation/robot.py b/robotpyExamples/examples/ElevatorExponentialSimulation/robot.py similarity index 100% rename from robotpyExamples/ElevatorExponentialSimulation/robot.py rename to robotpyExamples/examples/ElevatorExponentialSimulation/robot.py diff --git a/robotpyExamples/ElevatorExponentialSimulation/subsystems/elevator.py b/robotpyExamples/examples/ElevatorExponentialSimulation/subsystems/elevator.py similarity index 100% rename from robotpyExamples/ElevatorExponentialSimulation/subsystems/elevator.py rename to robotpyExamples/examples/ElevatorExponentialSimulation/subsystems/elevator.py diff --git a/robotpyExamples/ElevatorProfiledPID/robot.py b/robotpyExamples/examples/ElevatorProfiledPID/robot.py similarity index 100% rename from robotpyExamples/ElevatorProfiledPID/robot.py rename to robotpyExamples/examples/ElevatorProfiledPID/robot.py diff --git a/robotpyExamples/ElevatorSimulation/constants.py b/robotpyExamples/examples/ElevatorSimulation/constants.py similarity index 100% rename from robotpyExamples/ElevatorSimulation/constants.py rename to robotpyExamples/examples/ElevatorSimulation/constants.py diff --git a/robotpyExamples/ElevatorSimulation/robot.py b/robotpyExamples/examples/ElevatorSimulation/robot.py similarity index 100% rename from robotpyExamples/ElevatorSimulation/robot.py rename to robotpyExamples/examples/ElevatorSimulation/robot.py diff --git a/robotpyExamples/ElevatorSimulation/subsystems/elevator.py b/robotpyExamples/examples/ElevatorSimulation/subsystems/elevator.py similarity index 100% rename from robotpyExamples/ElevatorSimulation/subsystems/elevator.py rename to robotpyExamples/examples/ElevatorSimulation/subsystems/elevator.py diff --git a/robotpyExamples/ElevatorTrapezoidProfile/examplesmartmotorcontroller.py b/robotpyExamples/examples/ElevatorTrapezoidProfile/examplesmartmotorcontroller.py similarity index 100% rename from robotpyExamples/ElevatorTrapezoidProfile/examplesmartmotorcontroller.py rename to robotpyExamples/examples/ElevatorTrapezoidProfile/examplesmartmotorcontroller.py diff --git a/robotpyExamples/ElevatorTrapezoidProfile/robot.py b/robotpyExamples/examples/ElevatorTrapezoidProfile/robot.py similarity index 100% rename from robotpyExamples/ElevatorTrapezoidProfile/robot.py rename to robotpyExamples/examples/ElevatorTrapezoidProfile/robot.py diff --git a/robotpyExamples/Encoder/robot.py b/robotpyExamples/examples/Encoder/robot.py similarity index 100% rename from robotpyExamples/Encoder/robot.py rename to robotpyExamples/examples/Encoder/robot.py diff --git a/robotpyExamples/GettingStarted/robot.py b/robotpyExamples/examples/GettingStarted/robot.py similarity index 100% rename from robotpyExamples/GettingStarted/robot.py rename to robotpyExamples/examples/GettingStarted/robot.py diff --git a/robotpyExamples/Gyro/robot.py b/robotpyExamples/examples/Gyro/robot.py similarity index 100% rename from robotpyExamples/Gyro/robot.py rename to robotpyExamples/examples/Gyro/robot.py diff --git a/robotpyExamples/HatchbotInlined/commands/autos.py b/robotpyExamples/examples/HatchbotInlined/commands/autos.py similarity index 100% rename from robotpyExamples/HatchbotInlined/commands/autos.py rename to robotpyExamples/examples/HatchbotInlined/commands/autos.py diff --git a/robotpyExamples/HatchbotInlined/constants.py b/robotpyExamples/examples/HatchbotInlined/constants.py similarity index 100% rename from robotpyExamples/HatchbotInlined/constants.py rename to robotpyExamples/examples/HatchbotInlined/constants.py diff --git a/robotpyExamples/HatchbotInlined/robot.py b/robotpyExamples/examples/HatchbotInlined/robot.py similarity index 100% rename from robotpyExamples/HatchbotInlined/robot.py rename to robotpyExamples/examples/HatchbotInlined/robot.py diff --git a/robotpyExamples/HatchbotInlined/robotcontainer.py b/robotpyExamples/examples/HatchbotInlined/robotcontainer.py similarity index 100% rename from robotpyExamples/HatchbotInlined/robotcontainer.py rename to robotpyExamples/examples/HatchbotInlined/robotcontainer.py diff --git a/robotpyExamples/HatchbotInlined/subsystems/__init__.py b/robotpyExamples/examples/HatchbotInlined/subsystems/__init__.py similarity index 100% rename from robotpyExamples/HatchbotInlined/subsystems/__init__.py rename to robotpyExamples/examples/HatchbotInlined/subsystems/__init__.py diff --git a/robotpyExamples/HatchbotInlined/subsystems/drivesubsystem.py b/robotpyExamples/examples/HatchbotInlined/subsystems/drivesubsystem.py similarity index 100% rename from robotpyExamples/HatchbotInlined/subsystems/drivesubsystem.py rename to robotpyExamples/examples/HatchbotInlined/subsystems/drivesubsystem.py diff --git a/robotpyExamples/HatchbotInlined/subsystems/hatchsubsystem.py b/robotpyExamples/examples/HatchbotInlined/subsystems/hatchsubsystem.py similarity index 100% rename from robotpyExamples/HatchbotInlined/subsystems/hatchsubsystem.py rename to robotpyExamples/examples/HatchbotInlined/subsystems/hatchsubsystem.py diff --git a/robotpyExamples/HatchbotTraditional/commands/complexauto.py b/robotpyExamples/examples/HatchbotTraditional/commands/complexauto.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/complexauto.py rename to robotpyExamples/examples/HatchbotTraditional/commands/complexauto.py diff --git a/robotpyExamples/HatchbotTraditional/commands/defaultdrive.py b/robotpyExamples/examples/HatchbotTraditional/commands/defaultdrive.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/defaultdrive.py rename to robotpyExamples/examples/HatchbotTraditional/commands/defaultdrive.py diff --git a/robotpyExamples/HatchbotTraditional/commands/drivedistance.py b/robotpyExamples/examples/HatchbotTraditional/commands/drivedistance.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/drivedistance.py rename to robotpyExamples/examples/HatchbotTraditional/commands/drivedistance.py diff --git a/robotpyExamples/HatchbotTraditional/commands/grabhatch.py b/robotpyExamples/examples/HatchbotTraditional/commands/grabhatch.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/grabhatch.py rename to robotpyExamples/examples/HatchbotTraditional/commands/grabhatch.py diff --git a/robotpyExamples/HatchbotTraditional/commands/halvedrivevelocity.py b/robotpyExamples/examples/HatchbotTraditional/commands/halvedrivevelocity.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/halvedrivevelocity.py rename to robotpyExamples/examples/HatchbotTraditional/commands/halvedrivevelocity.py diff --git a/robotpyExamples/HatchbotTraditional/commands/releasehatch.py b/robotpyExamples/examples/HatchbotTraditional/commands/releasehatch.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/commands/releasehatch.py rename to robotpyExamples/examples/HatchbotTraditional/commands/releasehatch.py diff --git a/robotpyExamples/HatchbotTraditional/constants.py b/robotpyExamples/examples/HatchbotTraditional/constants.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/constants.py rename to robotpyExamples/examples/HatchbotTraditional/constants.py diff --git a/robotpyExamples/HatchbotTraditional/robot.py b/robotpyExamples/examples/HatchbotTraditional/robot.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/robot.py rename to robotpyExamples/examples/HatchbotTraditional/robot.py diff --git a/robotpyExamples/HatchbotTraditional/robotcontainer.py b/robotpyExamples/examples/HatchbotTraditional/robotcontainer.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/robotcontainer.py rename to robotpyExamples/examples/HatchbotTraditional/robotcontainer.py diff --git a/robotpyExamples/HatchbotTraditional/subsystems/__init__.py b/robotpyExamples/examples/HatchbotTraditional/subsystems/__init__.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/subsystems/__init__.py rename to robotpyExamples/examples/HatchbotTraditional/subsystems/__init__.py diff --git a/robotpyExamples/HatchbotTraditional/subsystems/drivesubsystem.py b/robotpyExamples/examples/HatchbotTraditional/subsystems/drivesubsystem.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/subsystems/drivesubsystem.py rename to robotpyExamples/examples/HatchbotTraditional/subsystems/drivesubsystem.py diff --git a/robotpyExamples/HatchbotTraditional/subsystems/hatchsubsystem.py b/robotpyExamples/examples/HatchbotTraditional/subsystems/hatchsubsystem.py similarity index 100% rename from robotpyExamples/HatchbotTraditional/subsystems/hatchsubsystem.py rename to robotpyExamples/examples/HatchbotTraditional/subsystems/hatchsubsystem.py diff --git a/robotpyExamples/MecanumBot/drivetrain.py b/robotpyExamples/examples/MecanumBot/drivetrain.py similarity index 100% rename from robotpyExamples/MecanumBot/drivetrain.py rename to robotpyExamples/examples/MecanumBot/drivetrain.py diff --git a/robotpyExamples/MecanumBot/robot.py b/robotpyExamples/examples/MecanumBot/robot.py similarity index 100% rename from robotpyExamples/MecanumBot/robot.py rename to robotpyExamples/examples/MecanumBot/robot.py diff --git a/robotpyExamples/MecanumDrive/robot.py b/robotpyExamples/examples/MecanumDrive/robot.py similarity index 100% rename from robotpyExamples/MecanumDrive/robot.py rename to robotpyExamples/examples/MecanumDrive/robot.py diff --git a/robotpyExamples/MecanumDrivePoseEstimator/drivetrain.py b/robotpyExamples/examples/MecanumDrivePoseEstimator/drivetrain.py similarity index 100% rename from robotpyExamples/MecanumDrivePoseEstimator/drivetrain.py rename to robotpyExamples/examples/MecanumDrivePoseEstimator/drivetrain.py diff --git a/robotpyExamples/MecanumDrivePoseEstimator/exampleglobalmeasurementsensor.py b/robotpyExamples/examples/MecanumDrivePoseEstimator/exampleglobalmeasurementsensor.py similarity index 100% rename from robotpyExamples/MecanumDrivePoseEstimator/exampleglobalmeasurementsensor.py rename to robotpyExamples/examples/MecanumDrivePoseEstimator/exampleglobalmeasurementsensor.py diff --git a/robotpyExamples/MecanumDrivePoseEstimator/robot.py b/robotpyExamples/examples/MecanumDrivePoseEstimator/robot.py similarity index 100% rename from robotpyExamples/MecanumDrivePoseEstimator/robot.py rename to robotpyExamples/examples/MecanumDrivePoseEstimator/robot.py diff --git a/robotpyExamples/Mechanism2d/robot.py b/robotpyExamples/examples/Mechanism2d/robot.py similarity index 100% rename from robotpyExamples/Mechanism2d/robot.py rename to robotpyExamples/examples/Mechanism2d/robot.py diff --git a/robotpyExamples/RapidReactCommandBot/constants.py b/robotpyExamples/examples/RapidReactCommandBot/constants.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/constants.py rename to robotpyExamples/examples/RapidReactCommandBot/constants.py diff --git a/robotpyExamples/RapidReactCommandBot/rapidreactcommandbot.py b/robotpyExamples/examples/RapidReactCommandBot/rapidreactcommandbot.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/rapidreactcommandbot.py rename to robotpyExamples/examples/RapidReactCommandBot/rapidreactcommandbot.py diff --git a/robotpyExamples/RapidReactCommandBot/robot.py b/robotpyExamples/examples/RapidReactCommandBot/robot.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/robot.py rename to robotpyExamples/examples/RapidReactCommandBot/robot.py diff --git a/robotpyExamples/RapidReactCommandBot/subsystems/drive.py b/robotpyExamples/examples/RapidReactCommandBot/subsystems/drive.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/subsystems/drive.py rename to robotpyExamples/examples/RapidReactCommandBot/subsystems/drive.py diff --git a/robotpyExamples/RapidReactCommandBot/subsystems/intake.py b/robotpyExamples/examples/RapidReactCommandBot/subsystems/intake.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/subsystems/intake.py rename to robotpyExamples/examples/RapidReactCommandBot/subsystems/intake.py diff --git a/robotpyExamples/RapidReactCommandBot/subsystems/pneumatics.py b/robotpyExamples/examples/RapidReactCommandBot/subsystems/pneumatics.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/subsystems/pneumatics.py rename to robotpyExamples/examples/RapidReactCommandBot/subsystems/pneumatics.py diff --git a/robotpyExamples/RapidReactCommandBot/subsystems/shooter.py b/robotpyExamples/examples/RapidReactCommandBot/subsystems/shooter.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/subsystems/shooter.py rename to robotpyExamples/examples/RapidReactCommandBot/subsystems/shooter.py diff --git a/robotpyExamples/RapidReactCommandBot/subsystems/storage.py b/robotpyExamples/examples/RapidReactCommandBot/subsystems/storage.py similarity index 100% rename from robotpyExamples/RapidReactCommandBot/subsystems/storage.py rename to robotpyExamples/examples/RapidReactCommandBot/subsystems/storage.py diff --git a/robotpyExamples/RomiReference/commands/arcadedrive.py b/robotpyExamples/examples/RomiReference/commands/arcadedrive.py similarity index 100% rename from robotpyExamples/RomiReference/commands/arcadedrive.py rename to robotpyExamples/examples/RomiReference/commands/arcadedrive.py diff --git a/robotpyExamples/RomiReference/commands/autonomousdistance.py b/robotpyExamples/examples/RomiReference/commands/autonomousdistance.py similarity index 100% rename from robotpyExamples/RomiReference/commands/autonomousdistance.py rename to robotpyExamples/examples/RomiReference/commands/autonomousdistance.py diff --git a/robotpyExamples/RomiReference/commands/autonomoustime.py b/robotpyExamples/examples/RomiReference/commands/autonomoustime.py similarity index 100% rename from robotpyExamples/RomiReference/commands/autonomoustime.py rename to robotpyExamples/examples/RomiReference/commands/autonomoustime.py diff --git a/robotpyExamples/RomiReference/commands/drivedistance.py b/robotpyExamples/examples/RomiReference/commands/drivedistance.py similarity index 100% rename from robotpyExamples/RomiReference/commands/drivedistance.py rename to robotpyExamples/examples/RomiReference/commands/drivedistance.py diff --git a/robotpyExamples/RomiReference/commands/drivetime.py b/robotpyExamples/examples/RomiReference/commands/drivetime.py similarity index 100% rename from robotpyExamples/RomiReference/commands/drivetime.py rename to robotpyExamples/examples/RomiReference/commands/drivetime.py diff --git a/robotpyExamples/RomiReference/commands/turndegrees.py b/robotpyExamples/examples/RomiReference/commands/turndegrees.py similarity index 100% rename from robotpyExamples/RomiReference/commands/turndegrees.py rename to robotpyExamples/examples/RomiReference/commands/turndegrees.py diff --git a/robotpyExamples/RomiReference/commands/turntime.py b/robotpyExamples/examples/RomiReference/commands/turntime.py similarity index 100% rename from robotpyExamples/RomiReference/commands/turntime.py rename to robotpyExamples/examples/RomiReference/commands/turntime.py diff --git a/robotpyExamples/RomiReference/robot.py b/robotpyExamples/examples/RomiReference/robot.py similarity index 100% rename from robotpyExamples/RomiReference/robot.py rename to robotpyExamples/examples/RomiReference/robot.py diff --git a/robotpyExamples/RomiReference/robotcontainer.py b/robotpyExamples/examples/RomiReference/robotcontainer.py similarity index 100% rename from robotpyExamples/RomiReference/robotcontainer.py rename to robotpyExamples/examples/RomiReference/robotcontainer.py diff --git a/robotpyExamples/RomiReference/subsystems/drivetrain.py b/robotpyExamples/examples/RomiReference/subsystems/drivetrain.py similarity index 100% rename from robotpyExamples/RomiReference/subsystems/drivetrain.py rename to robotpyExamples/examples/RomiReference/subsystems/drivetrain.py diff --git a/robotpyExamples/SimpleDifferentialDriveSimulation/drivetrain.py b/robotpyExamples/examples/SimpleDifferentialDriveSimulation/drivetrain.py similarity index 100% rename from robotpyExamples/SimpleDifferentialDriveSimulation/drivetrain.py rename to robotpyExamples/examples/SimpleDifferentialDriveSimulation/drivetrain.py diff --git a/robotpyExamples/SimpleDifferentialDriveSimulation/robot.py b/robotpyExamples/examples/SimpleDifferentialDriveSimulation/robot.py similarity index 100% rename from robotpyExamples/SimpleDifferentialDriveSimulation/robot.py rename to robotpyExamples/examples/SimpleDifferentialDriveSimulation/robot.py diff --git a/robotpyExamples/StateSpaceArm/robot.py b/robotpyExamples/examples/StateSpaceArm/robot.py similarity index 100% rename from robotpyExamples/StateSpaceArm/robot.py rename to robotpyExamples/examples/StateSpaceArm/robot.py diff --git a/robotpyExamples/StateSpaceElevator/robot.py b/robotpyExamples/examples/StateSpaceElevator/robot.py similarity index 100% rename from robotpyExamples/StateSpaceElevator/robot.py rename to robotpyExamples/examples/StateSpaceElevator/robot.py diff --git a/robotpyExamples/StateSpaceFlywheel/robot.py b/robotpyExamples/examples/StateSpaceFlywheel/robot.py similarity index 100% rename from robotpyExamples/StateSpaceFlywheel/robot.py rename to robotpyExamples/examples/StateSpaceFlywheel/robot.py diff --git a/robotpyExamples/StateSpaceFlywheelSysId/robot.py b/robotpyExamples/examples/StateSpaceFlywheelSysId/robot.py similarity index 100% rename from robotpyExamples/StateSpaceFlywheelSysId/robot.py rename to robotpyExamples/examples/StateSpaceFlywheelSysId/robot.py diff --git a/robotpyExamples/SwerveBot/drivetrain.py b/robotpyExamples/examples/SwerveBot/drivetrain.py similarity index 100% rename from robotpyExamples/SwerveBot/drivetrain.py rename to robotpyExamples/examples/SwerveBot/drivetrain.py diff --git a/robotpyExamples/SwerveBot/robot.py b/robotpyExamples/examples/SwerveBot/robot.py similarity index 100% rename from robotpyExamples/SwerveBot/robot.py rename to robotpyExamples/examples/SwerveBot/robot.py diff --git a/robotpyExamples/SwerveBot/swervemodule.py b/robotpyExamples/examples/SwerveBot/swervemodule.py similarity index 100% rename from robotpyExamples/SwerveBot/swervemodule.py rename to robotpyExamples/examples/SwerveBot/swervemodule.py diff --git a/robotpyExamples/SwerveDrivePoseEstimator/drivetrain.py b/robotpyExamples/examples/SwerveDrivePoseEstimator/drivetrain.py similarity index 100% rename from robotpyExamples/SwerveDrivePoseEstimator/drivetrain.py rename to robotpyExamples/examples/SwerveDrivePoseEstimator/drivetrain.py diff --git a/robotpyExamples/SwerveDrivePoseEstimator/exampleglobalmeasurementsensor.py b/robotpyExamples/examples/SwerveDrivePoseEstimator/exampleglobalmeasurementsensor.py similarity index 100% rename from robotpyExamples/SwerveDrivePoseEstimator/exampleglobalmeasurementsensor.py rename to robotpyExamples/examples/SwerveDrivePoseEstimator/exampleglobalmeasurementsensor.py diff --git a/robotpyExamples/SwerveDrivePoseEstimator/robot.py b/robotpyExamples/examples/SwerveDrivePoseEstimator/robot.py similarity index 100% rename from robotpyExamples/SwerveDrivePoseEstimator/robot.py rename to robotpyExamples/examples/SwerveDrivePoseEstimator/robot.py diff --git a/robotpyExamples/SwerveDrivePoseEstimator/swervemodule.py b/robotpyExamples/examples/SwerveDrivePoseEstimator/swervemodule.py similarity index 100% rename from robotpyExamples/SwerveDrivePoseEstimator/swervemodule.py rename to robotpyExamples/examples/SwerveDrivePoseEstimator/swervemodule.py diff --git a/robotpyExamples/SysId/constants.py b/robotpyExamples/examples/SysId/constants.py similarity index 100% rename from robotpyExamples/SysId/constants.py rename to robotpyExamples/examples/SysId/constants.py diff --git a/robotpyExamples/SysId/robot.py b/robotpyExamples/examples/SysId/robot.py similarity index 100% rename from robotpyExamples/SysId/robot.py rename to robotpyExamples/examples/SysId/robot.py diff --git a/robotpyExamples/SysId/subsystems/drive.py b/robotpyExamples/examples/SysId/subsystems/drive.py similarity index 100% rename from robotpyExamples/SysId/subsystems/drive.py rename to robotpyExamples/examples/SysId/subsystems/drive.py diff --git a/robotpyExamples/SysId/subsystems/shooter.py b/robotpyExamples/examples/SysId/subsystems/shooter.py similarity index 100% rename from robotpyExamples/SysId/subsystems/shooter.py rename to robotpyExamples/examples/SysId/subsystems/shooter.py diff --git a/robotpyExamples/SysId/sysidroutinebot.py b/robotpyExamples/examples/SysId/sysidroutinebot.py similarity index 100% rename from robotpyExamples/SysId/sysidroutinebot.py rename to robotpyExamples/examples/SysId/sysidroutinebot.py diff --git a/robotpyExamples/TankDrive/robot.py b/robotpyExamples/examples/TankDrive/robot.py similarity index 100% rename from robotpyExamples/TankDrive/robot.py rename to robotpyExamples/examples/TankDrive/robot.py diff --git a/robotpyExamples/TankDriveXboxController/robot.py b/robotpyExamples/examples/TankDriveXboxController/robot.py similarity index 100% rename from robotpyExamples/TankDriveXboxController/robot.py rename to robotpyExamples/examples/TankDriveXboxController/robot.py diff --git a/robotpyExamples/UnitTest/constants.py b/robotpyExamples/examples/UnitTest/constants.py similarity index 100% rename from robotpyExamples/UnitTest/constants.py rename to robotpyExamples/examples/UnitTest/constants.py diff --git a/robotpyExamples/UnitTest/robot.py b/robotpyExamples/examples/UnitTest/robot.py similarity index 100% rename from robotpyExamples/UnitTest/robot.py rename to robotpyExamples/examples/UnitTest/robot.py diff --git a/robotpyExamples/UnitTest/subsystems/intake.py b/robotpyExamples/examples/UnitTest/subsystems/intake.py similarity index 100% rename from robotpyExamples/UnitTest/subsystems/intake.py rename to robotpyExamples/examples/UnitTest/subsystems/intake.py diff --git a/robotpyExamples/XrpReference/commands/arcadedrive.py b/robotpyExamples/examples/XrpReference/commands/arcadedrive.py similarity index 100% rename from robotpyExamples/XrpReference/commands/arcadedrive.py rename to robotpyExamples/examples/XrpReference/commands/arcadedrive.py diff --git a/robotpyExamples/XrpReference/commands/autonomousdistance.py b/robotpyExamples/examples/XrpReference/commands/autonomousdistance.py similarity index 100% rename from robotpyExamples/XrpReference/commands/autonomousdistance.py rename to robotpyExamples/examples/XrpReference/commands/autonomousdistance.py diff --git a/robotpyExamples/XrpReference/commands/autonomoustime.py b/robotpyExamples/examples/XrpReference/commands/autonomoustime.py similarity index 100% rename from robotpyExamples/XrpReference/commands/autonomoustime.py rename to robotpyExamples/examples/XrpReference/commands/autonomoustime.py diff --git a/robotpyExamples/XrpReference/commands/drivedistance.py b/robotpyExamples/examples/XrpReference/commands/drivedistance.py similarity index 100% rename from robotpyExamples/XrpReference/commands/drivedistance.py rename to robotpyExamples/examples/XrpReference/commands/drivedistance.py diff --git a/robotpyExamples/XrpReference/commands/drivetime.py b/robotpyExamples/examples/XrpReference/commands/drivetime.py similarity index 100% rename from robotpyExamples/XrpReference/commands/drivetime.py rename to robotpyExamples/examples/XrpReference/commands/drivetime.py diff --git a/robotpyExamples/XrpReference/commands/turndegrees.py b/robotpyExamples/examples/XrpReference/commands/turndegrees.py similarity index 100% rename from robotpyExamples/XrpReference/commands/turndegrees.py rename to robotpyExamples/examples/XrpReference/commands/turndegrees.py diff --git a/robotpyExamples/XrpReference/commands/turntime.py b/robotpyExamples/examples/XrpReference/commands/turntime.py similarity index 100% rename from robotpyExamples/XrpReference/commands/turntime.py rename to robotpyExamples/examples/XrpReference/commands/turntime.py diff --git a/robotpyExamples/XrpReference/robot.py b/robotpyExamples/examples/XrpReference/robot.py similarity index 100% rename from robotpyExamples/XrpReference/robot.py rename to robotpyExamples/examples/XrpReference/robot.py diff --git a/robotpyExamples/XrpReference/robotcontainer.py b/robotpyExamples/examples/XrpReference/robotcontainer.py similarity index 100% rename from robotpyExamples/XrpReference/robotcontainer.py rename to robotpyExamples/examples/XrpReference/robotcontainer.py diff --git a/robotpyExamples/XrpReference/subsystems/arm.py b/robotpyExamples/examples/XrpReference/subsystems/arm.py similarity index 100% rename from robotpyExamples/XrpReference/subsystems/arm.py rename to robotpyExamples/examples/XrpReference/subsystems/arm.py diff --git a/robotpyExamples/XrpReference/subsystems/drivetrain.py b/robotpyExamples/examples/XrpReference/subsystems/drivetrain.py similarity index 100% rename from robotpyExamples/XrpReference/subsystems/drivetrain.py rename to robotpyExamples/examples/XrpReference/subsystems/drivetrain.py diff --git a/robotpyExamples/examples.toml b/robotpyExamples/examples/examples.toml similarity index 75% rename from robotpyExamples/examples.toml rename to robotpyExamples/examples/examples.toml index 29c5587c42..efef6ea1f9 100644 --- a/robotpyExamples/examples.toml +++ b/robotpyExamples/examples/examples.toml @@ -1,43 +1,29 @@ [tests] base = [ - "AddressableLED", - "AprilTagsVision", "ArcadeDrive", "ArcadeDriveXboxController", "ArmSimulation", - "CANPDP", "DifferentialDriveBot", "DifferentialDrivePoseEstimator", - "DigitalCommunication", "DriveDistanceOffboard", "DutyCycleEncoder", - "DutyCycleInput", "ElevatorExponentialProfile", "ElevatorExponentialSimulation", "ElevatorProfiledPID", "ElevatorSimulation", "ElevatorTrapezoidProfile", "Encoder", - "EventLoop", - "FlywheelBangBangController", "GettingStarted", "Gyro", "HatchbotInlined", "HatchbotTraditional", - "HttpCamera", - "I2CCommunication", - "IntermediateVision", "MecanumBot", "MecanumDrive", "MecanumDrivePoseEstimator", "Mechanism2d", - "MotorControl", - "QuickVision", "RapidReactCommandBot", "RomiReference", - "SelectCommand", "SimpleDifferentialDriveSimulation", - "Solenoid", "StateSpaceArm", "StateSpaceElevator", "StateSpaceFlywheel", diff --git a/robotpyExamples/generate_bazel_files.py b/robotpyExamples/generate_bazel_files.py index c887bdb011..fea2d8f8b5 100644 --- a/robotpyExamples/generate_bazel_files.py +++ b/robotpyExamples/generate_bazel_files.py @@ -2,18 +2,24 @@ import sys import tomli -def main(): - toml_filename = "robotpyExamples/examples.toml" - output_file = "robotpyExamples/example_projects.bzl" +def load_project_names(toml_filename, project_type): with open(toml_filename, "rb") as f: data = tomli.load(f) - contents = "PROJECTS = [\n" + contents = f"{project_type.upper()}_PROJECTS = [\n" for test_folder in data["tests"]["base"]: - contents += f' "{test_folder}",\n' + contents += f' "{project_type}s/{test_folder}",\n' contents += "]\n" + return contents + +def main(): + output_file = "robotpyExamples/example_projects.bzl" + + contents = load_project_names("robotpyExamples/examples/examples.toml", "example") + contents += load_project_names("robotpyExamples/snippets/snippets.toml", "snippet") + if len(sys.argv) == 2: output_file = sys.argv[1] diff --git a/robotpyExamples/AddressableLED/robot.py b/robotpyExamples/snippets/AddressableLED/robot.py similarity index 100% rename from robotpyExamples/AddressableLED/robot.py rename to robotpyExamples/snippets/AddressableLED/robot.py diff --git a/robotpyExamples/AprilTagsVision/robot.py b/robotpyExamples/snippets/AprilTagsVision/robot.py similarity index 100% rename from robotpyExamples/AprilTagsVision/robot.py rename to robotpyExamples/snippets/AprilTagsVision/robot.py diff --git a/robotpyExamples/AprilTagsVision/vision.py b/robotpyExamples/snippets/AprilTagsVision/vision.py similarity index 100% rename from robotpyExamples/AprilTagsVision/vision.py rename to robotpyExamples/snippets/AprilTagsVision/vision.py diff --git a/robotpyExamples/CANPDP/robot.py b/robotpyExamples/snippets/CANPDP/robot.py similarity index 100% rename from robotpyExamples/CANPDP/robot.py rename to robotpyExamples/snippets/CANPDP/robot.py diff --git a/robotpyExamples/DigitalCommunication/robot.py b/robotpyExamples/snippets/DigitalCommunication/robot.py similarity index 100% rename from robotpyExamples/DigitalCommunication/robot.py rename to robotpyExamples/snippets/DigitalCommunication/robot.py diff --git a/robotpyExamples/DutyCycleInput/robot.py b/robotpyExamples/snippets/DutyCycleInput/robot.py similarity index 100% rename from robotpyExamples/DutyCycleInput/robot.py rename to robotpyExamples/snippets/DutyCycleInput/robot.py diff --git a/robotpyExamples/EventLoop/robot.py b/robotpyExamples/snippets/EventLoop/robot.py similarity index 100% rename from robotpyExamples/EventLoop/robot.py rename to robotpyExamples/snippets/EventLoop/robot.py diff --git a/robotpyExamples/FlywheelBangBangController/robot.py b/robotpyExamples/snippets/FlywheelBangBangController/robot.py similarity index 100% rename from robotpyExamples/FlywheelBangBangController/robot.py rename to robotpyExamples/snippets/FlywheelBangBangController/robot.py diff --git a/robotpyExamples/HttpCamera/robot.py b/robotpyExamples/snippets/HttpCamera/robot.py similarity index 100% rename from robotpyExamples/HttpCamera/robot.py rename to robotpyExamples/snippets/HttpCamera/robot.py diff --git a/robotpyExamples/HttpCamera/vision.py b/robotpyExamples/snippets/HttpCamera/vision.py similarity index 100% rename from robotpyExamples/HttpCamera/vision.py rename to robotpyExamples/snippets/HttpCamera/vision.py diff --git a/robotpyExamples/I2CCommunication/robot.py b/robotpyExamples/snippets/I2CCommunication/robot.py similarity index 100% rename from robotpyExamples/I2CCommunication/robot.py rename to robotpyExamples/snippets/I2CCommunication/robot.py diff --git a/robotpyExamples/IntermediateVision/robot.py b/robotpyExamples/snippets/IntermediateVision/robot.py similarity index 100% rename from robotpyExamples/IntermediateVision/robot.py rename to robotpyExamples/snippets/IntermediateVision/robot.py diff --git a/robotpyExamples/IntermediateVision/vision.py b/robotpyExamples/snippets/IntermediateVision/vision.py similarity index 100% rename from robotpyExamples/IntermediateVision/vision.py rename to robotpyExamples/snippets/IntermediateVision/vision.py diff --git a/robotpyExamples/MotorControl/robot.py b/robotpyExamples/snippets/MotorControl/robot.py similarity index 100% rename from robotpyExamples/MotorControl/robot.py rename to robotpyExamples/snippets/MotorControl/robot.py diff --git a/robotpyExamples/QuickVision/robot.py b/robotpyExamples/snippets/QuickVision/robot.py similarity index 100% rename from robotpyExamples/QuickVision/robot.py rename to robotpyExamples/snippets/QuickVision/robot.py diff --git a/robotpyExamples/SelectCommand/constants.py b/robotpyExamples/snippets/SelectCommand/constants.py similarity index 100% rename from robotpyExamples/SelectCommand/constants.py rename to robotpyExamples/snippets/SelectCommand/constants.py diff --git a/robotpyExamples/SelectCommand/robot.py b/robotpyExamples/snippets/SelectCommand/robot.py similarity index 100% rename from robotpyExamples/SelectCommand/robot.py rename to robotpyExamples/snippets/SelectCommand/robot.py diff --git a/robotpyExamples/SelectCommand/robotcontainer.py b/robotpyExamples/snippets/SelectCommand/robotcontainer.py similarity index 100% rename from robotpyExamples/SelectCommand/robotcontainer.py rename to robotpyExamples/snippets/SelectCommand/robotcontainer.py diff --git a/robotpyExamples/Solenoid/robot.py b/robotpyExamples/snippets/Solenoid/robot.py similarity index 100% rename from robotpyExamples/Solenoid/robot.py rename to robotpyExamples/snippets/Solenoid/robot.py diff --git a/robotpyExamples/snippets/snippets.toml b/robotpyExamples/snippets/snippets.toml new file mode 100644 index 0000000000..ca3ae0b3e1 --- /dev/null +++ b/robotpyExamples/snippets/snippets.toml @@ -0,0 +1,20 @@ +[tests] +base = [ + "AddressableLED", + "AprilTagsVision", + "CANPDP", + "DigitalCommunication", + "DutyCycleInput", + "EventLoop", + "FlywheelBangBangController", + "HttpCamera", + "I2CCommunication", + "IntermediateVision", + "MotorControl", + "QuickVision", + "SelectCommand", + "Solenoid", +] + +ignored = [ +]