Skip to content

Conversation

jasondaming
Copy link
Member

Summary

Updates all references to robotpy_extras to use the new components key name in pyproject.toml, following the change made in robotpy-installer.

Changes

  • Updated 3rd-party-libraries.rst to reference components instead of robotpy_extras
  • Updated pyproject_toml.rst example configuration and documentation
  • Updated cameraserver documentation examples to use components

Fixes #3119

Copy link
Member

@virtuald virtuald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The big change with robotpy_extras -> components is that components only install/select packages built by mostwpilib (so, only core wpilib packages). Vendor packages must be installed via requires now.

    The project requirements are determined by reading pyproject.toml. An
    example pyproject.toml is:

        [tool.robotpy]

        # Version of robotpy this project depends on
        robotpy_version = "{robotpy_version}"

        # Which optional RobotPy components should be installed?
        # -> equivalent to `pip install robotpy[component1, ...]
        components = []

        # Other pip packages to install, such as vendor packages (each element
        # is equivalent to a line in requirements.txt)
        requires = []

    If no pyproject.toml exists, a default is created using the current robotpy
    package version.

| PhotonVision | Vendor | photonvision | photonlibpy |
+---------------------+-----------+-------------------+---------------------------+
+---------------------+-----------+-------------+---------------------------+
| | Origin | components | requires |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can no longer install vendor deps via components.

- components is only for core WPILib packages
- Vendor packages must use requires
- Removed components column from vendor packages table
- Updated documentation text to clarify the distinction
``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 built by mostrobotics can be specified here; vendor packages must be listed in ``requires``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "built by mostrobotics", thats an internal detail that users don't need to know. And the name is wrong.

Per review feedback, users don't need to know this internal detail
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be commited

``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``.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional core sounds wierd, I think here just optional WPILib packages is ok.

Per review feedback, updated documentation to make it clear that:
- 'components' is ONLY for core WPILib packages built by WPILib
- ALL vendor packages must be specified in 'requires'

Changes:
- Added important note emphasizing the distinction
- Removed 'components' column from WPILib components table
- Updated vendor packages table header to clarify these use 'requires'
- Updated pyproject.toml example to show vendor packages in 'requires' only
- Removed vendor packages from components list in example

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

robotpy: update 'robotpy_extras' to 'components'

3 participants