wpilibsuite / frc-docs

Official FRC Documentation powered by Read the Docs
https://docs.wpilib.org
Other
145 stars 256 forks source link

Python edits to Command documentation #2648

Closed mbardoe closed 1 month ago

mbardoe commented 1 month ago

In response to requests for Python additions to the Command Based robot documentation I have tried to incorporate the appropriate Python code and links for some of the files. You can see this CD post [https://www.chiefdelphi.com/t/robotpy-2024-beta/443117] (https://www.chiefdelphi.com/t/robotpy-2024-beta/443117) #2645. This is my first time with frc-docs contributions so let me know the ways that this can be improved.

sciencewhiz commented 1 month ago

The links to python API docs can be simplified to the following (for the Driverstation as example)

:external:py:class:`Python <robotpy:wpilib.DriverStation>`
mbardoe commented 1 month ago

The links to python API docs can be simplified to the following (for the Driverstation as example)

:external:py:class:`Python <robotpy:wpilib.DriverStation>`

I am struggling to make these work. Most of my links are to the commands2 library rather than straight wpilib.

I see that I can use :external:py:meth for the methods, but I don't know how to access the commands2 library.

virtuald commented 1 month ago

Because it's new, nobody added it to intersphinx. You can link to them using commands2 instead of robotpy if you use the commit in https://github.com/wpilibsuite/frc-docs/pull/2657

sciencewhiz commented 1 month ago

2657 has been merged, so you can merge main and use it now.