diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..1ffa90af53 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +- never work on an issue that already has a PR fixing it \ No newline at end of file diff --git a/source/docs/software/python/pyproject_toml.rst b/source/docs/software/python/pyproject_toml.rst index 4fb249883f..028c49c77e 100644 --- a/source/docs/software/python/pyproject_toml.rst +++ b/source/docs/software/python/pyproject_toml.rst @@ -16,31 +16,34 @@ The ``pyproject.toml`` file looks something like this: [tool.robotpy] # Version of robotpy this project depends on robotpy_version = "2024.2.1.0" -# Which extra RobotPy components should be installed +# Which core WPILib components should be installed # -> equivalent to `pip install robotpy[extra1, ...] -robotpy_extras = [ +components = [ # "all" # "apriltag" # "commands2" # "cscore" - # "navx" - # "pathplannerlib" - # "phoenix5" - # "phoenix6" - # "playingwithfusion" - # "rev" # "romi" # "sim" + # "xrp" +] +# Other pip packages to install (including vendor packages) +requires = [ + # Vendor packages (examples): + # "robotpy-navx" + # "robotpy-pathplannerlib" + # "robotpy-ctre" # Phoenix 5 + # "phoenix6" + # "robotpy-playingwithfusion" + # "robotpy-rev" ] -# Other pip packages to install -requires = [] ``` Each of the following will instruct the deploy process to install packages to the roboRIO: ``robotpy_version`` is the version of the ``robotpy`` PyPI package that this robot code depends on. -``robotpy_extras`` defines extra RobotPy components that can be installed, as only the core RobotPy libraries are installed by default. +``components`` defines which optional core WPILib packages should be installed (equivalent to ``pip install robotpy[component1, ...]``). Only core WPILib packages can be specified here; vendor packages must be listed in ``requires``. ``requires`` is a list of strings, and each item is equivalent to a line of a [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file. You can install any pure python packages on the roboRIO and they will likely work, but any packages that have binary dependencies must be cross-compiled for the roboRIO. For example, if you needed to use ``numpy`` in your robot code: diff --git a/source/docs/software/vision-processing/roborio/using-multiple-cameras.rst b/source/docs/software/vision-processing/roborio/using-multiple-cameras.rst index 05dc64ad9a..cd2603538d 100644 --- a/source/docs/software/vision-processing/roborio/using-multiple-cameras.rst +++ b/source/docs/software/vision-processing/roborio/using-multiple-cameras.rst @@ -96,8 +96,8 @@ If you're interested in just switching what the driver sees, and are using Smart ```toml [tool.robotpy] ... - # Add cscore to the robotpy-extras list - robotpy_extras = ["cscore"] + # Add cscore to the components list + components = ["cscore"] ``` If you're using some other dashboard, you can change the camera used by the camera server dynamically. If you open a stream viewer nominally to camera1, the robot code will change the stream contents to either camera1 or camera2 based on the joystick trigger. @@ -259,8 +259,8 @@ By default, the cscore library is pretty aggressive in turning off cameras not i ```toml [tool.robotpy] ... - # Add cscore to the robotpy-extras list - robotpy_extras = ["cscore"] + # Add cscore to the components list + components = ["cscore"] ``` .. note:: diff --git a/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst b/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst index 4fa284ca16..a69d5e47b3 100644 --- a/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst +++ b/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst @@ -81,13 +81,13 @@ In the following example a thread created in ``Robot`` constructor gets the Came :lines: 12-55 :linenos: - You need to update ``pyproject.toml`` contents to include cscore in the robotpy-extras key (this only shows the portions you need to update): + You need to update ``pyproject.toml`` contents to include cscore in the components key (this only shows the portions you need to update): ```toml [tool.robotpy] ... - # Add cscore to the robotpy-extras list - robotpy_extras = ["cscore"] + # Add cscore to the components list + components = ["cscore"] ``` Notice that in these examples, the ``PutVideo()`` method writes the video to a named stream. To view that stream on SmartDashboard or Shuffleboard, select that named stream. In this case that is "Rectangle". diff --git a/source/docs/software/vscode-overview/3rd-party-libraries.rst b/source/docs/software/vscode-overview/3rd-party-libraries.rst index 33a2ec50a7..c70575a7ce 100644 --- a/source/docs/software/vscode-overview/3rd-party-libraries.rst +++ b/source/docs/software/vscode-overview/3rd-party-libraries.rst @@ -42,52 +42,54 @@ Vendor dependencies are installed on a per-project basis (so each robot project .. tab-item:: Python :sync: python - All RobotPy project dependencies are specified in ``pyproject.toml``. You can add additional vendor-specific dependencies either by: + All RobotPy project dependencies are specified in ``pyproject.toml``. You can add additional dependencies by: - * Adding the component name to ``robotpy_extras`` - * Adding the PyPI package name to ``requires`` + * Adding WPILib component names to ``components`` (for core WPILib packages built by WPILib only) + * Adding PyPI package names to ``requires`` (for all vendor packages and other dependencies) + + .. important:: Only core WPILib packages can be specified in ``components``. All vendor packages must be listed in ``requires``. .. seealso:: :doc:`/docs/software/python/pyproject_toml` - Optional WPILib components: - - +----------+----------------+---------------------+ - | | robotpy_extras | requires | - +==========+================+=====================+ - | Apriltag | apriltag | robotpy-apriltag | - +----------+----------------+---------------------+ - | Commands | commands2 | robotpy-commands-v2 | - +----------+----------------+---------------------+ - | cscore | cscore | robotpy-cscore | - +----------+----------------+---------------------+ - | Romi | romi | robotpy-romi | - +----------+----------------+---------------------+ - | XRP | xrp | robotpy-xrp | - +----------+----------------+---------------------+ - - Optional vendor-specific components (not all are available at the beginning of the season): - - +---------------------+-----------+-------------------+---------------------------+ - | | Origin | robotpy_extras | requires | - +=====================+===========+===================+===========================+ - | ChoreoLib | Vendor | | sleipnirgroup-choreolib | - +---------------------+-----------+-------------------+---------------------------+ - | CTRE Phoenix 6 | Vendor | phoenix6 | phoenix6 | - +---------------------+-----------+-------------------+---------------------------+ - | CTRE Phoenix 5 | Community | phoenix5 | robotpy-ctre | - +---------------------+-----------+-------------------+---------------------------+ - | PathPlannerLib | Vendor | pathplannerlib | robotpy-pathplannerlib | - +---------------------+-----------+-------------------+---------------------------+ - | PhotonVision | Vendor | photonvision | photonlibpy | - +---------------------+-----------+-------------------+---------------------------+ - | Playing With Fusion | Community | playingwithfusion | robotpy-playingwithfusion | - +---------------------+-----------+-------------------+---------------------------+ - | REVLib | Community | rev | robotpy-rev | - +---------------------+-----------+-------------------+---------------------------+ - | Studica | Community | navx | robotpy-navx | - +---------------------+-----------+-------------------+---------------------------+ - | URCL | Community | | robotpy-urcl | - +---------------------+-----------+-------------------+---------------------------+ + Optional WPILib components (use ``components``): + + +----------+------------+ + | | components | + +==========+============+ + | Apriltag | apriltag | + +----------+------------+ + | Commands | commands2 | + +----------+------------+ + | cscore | cscore | + +----------+------------+ + | Romi | romi | + +----------+------------+ + | XRP | xrp | + +----------+------------+ + + Vendor packages (use ``requires``, not all are available at the beginning of the season): + + +---------------------+-----------+---------------------------+ + | | Origin | PyPI Package Name | + +=====================+===========+===========================+ + | ChoreoLib | Vendor | sleipnirgroup-choreolib | + +---------------------+-----------+---------------------------+ + | CTRE Phoenix 6 | Vendor | phoenix6 | + +---------------------+-----------+---------------------------+ + | CTRE Phoenix 5 | Community | robotpy-ctre | + +---------------------+-----------+---------------------------+ + | PathPlannerLib | Vendor | robotpy-pathplannerlib | + +---------------------+-----------+---------------------------+ + | PhotonVision | Vendor | photonlibpy | + +---------------------+-----------+---------------------------+ + | Playing With Fusion | Community | robotpy-playingwithfusion | + +---------------------+-----------+---------------------------+ + | REVLib | Community | robotpy-rev | + +---------------------+-----------+---------------------------+ + | Studica | Community | robotpy-navx | + +---------------------+-----------+---------------------------+ + | URCL | Community | robotpy-urcl | + +---------------------+-----------+---------------------------+ When using ``requires``, you can specify a version by appending ``==`` to the package name, e.g. ``robotpy-commands-v2==2024.0.0``. If you do not specify a version, the latest version will be installed. @@ -155,4 +157,4 @@ Vendor dependencies are installed on a per-project basis (so each robot project .. tab-item:: Python :sync: python - Third party libraries are packaged into Python wheels and uploaded to PyPI (if pure python) and/or WPILib's artifactory. Users can enable them as dependencies either by adding the component name to ``robotpy_extras`` (recommended) or by adding an explicit dependency for the PyPI package in ``requires``. The dependencies are downloaded when ``robotpy sync`` is executed, and installed on the roboRIO when ``robotpy deploy`` is executed. + Third party libraries are packaged into Python wheels and uploaded to PyPI (if pure python) and/or WPILib's artifactory. Core WPILib packages can be installed by adding the component name to ``components``, while vendor packages must be added to ``requires`` with their PyPI package name. The dependencies are downloaded when ``robotpy sync`` is executed, and installed on the roboRIO when ``robotpy deploy`` is executed.