Skip to content

Commit eca17a1

Browse files
committed
Delete a lot, move a lot, update a lot
1 parent ae3638e commit eca17a1

23 files changed

+85
-1777
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ become increasingly more difficult to introduce all of the pieces to new
66
users. This is the foundation for a unified documentation site for all
77
RobotPy projects, in hopes of reducing that confusion.
88

9+
Now that Python is an officialy supported language, this site still aims to unify the various API documentation for RobotPy projects. However, much of our documentation has been moved to the [WPILib documentation](https://docs.wpilib.org).
10+
911
All of our documentation is built using Sphinx, and is hosted at
1012
http://robotpy.readthedocs.io/
1113

conf.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,34 @@
9393
}
9494

9595
redirects = {
96+
"getting_started": f"{frc_docs}/docs/zero-to-robot/introduction.html",
9697
"2020_notes": "upgrade_notes.html",
9798
"install/pynetworktables": "pyntcore.html",
98-
"frameworks/command": f"{frc_docs}/docs/software/commandbased/index",
99+
"frameworks/command": f"{frc_docs}/docs/software/commandbased/",
100+
"guide/anatomy": f"{frc_docs}/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.html",
101+
"guide/index": f"{frc_docs}/docs/software/python/",
102+
"guide/deploy": f"{frc_docs}/docs/software/python/subcommands/deploy.html",
99103
"guide/examples": "https://github.com/robotpy/examples",
104+
"guide/guidelines": "guidelines",
100105
"guide/nt": f"{frc_docs}/docs/software/networktables/index.html",
106+
"guide/running": f"{frc_docs}/docs/software/python/subcommands/index.html",
107+
"guide/python": "https://docs.python-guide.org/en/latest/intro/learning/",
108+
"guide/simulator": f"{frc_docs}/docs/software/wpilib-tools/robot-simulation/introduction.html",
109+
"guide/testing": "testing",
101110
"hw": f"{frc_docs}/docs/hardware/hardware-basics/index.html",
102-
"install/commands": "install/components",
103-
"install/cscore": "install/components",
104-
"install/ctre": "install/components",
105-
"install/navx": "install/components",
106-
"install/pathplannerlib": "install/components",
107-
"install/pwfusion": "install/components",
108-
"install/pyfrc": "install/components",
109-
"install/pyntcore": "install/components",
110-
"install/rev": "install/components",
111+
"install/computer": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
112+
"install/components": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
113+
"install/packages": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
114+
"install/robot": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
115+
"install/commands": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
116+
"install/cscore": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
117+
"install/ctre": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
118+
"install/navx": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
119+
"install/pathplannerlib": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
120+
"install/pwfusion": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
121+
"install/pyfrc": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
122+
"install/pyntcore": f"{frc_docs}/docs/zero-to-robot/step-2/python-setup.html",
123+
"install/rev": f"{frc_docs}/docs/software/vscode-overview/3rd-party-libraries.html",
111124
"vision/code": f"{frc_docs}/docs/software/vision-processing/index.html",
112125
"vision/index": f"{frc_docs}/docs/software/vision-processing/index.html",
113126
"vision/other": f"{frc_docs}/docs/software/vision-processing/index.html",
@@ -184,7 +197,7 @@
184197
epub_title = "RobotPy"
185198
epub_author = "RobotPy development team"
186199
epub_publisher = "RobotPy development team"
187-
epub_copyright = "2014-2022, RobotPy development team"
200+
epub_copyright = "2014-2024, RobotPy development team"
188201

189202
# A list of files that should not be packed into the epub file.
190203
epub_exclude_files = ["search.html"]

dev/deploy.rst

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,26 @@
44
Deploy process details
55
======================
66

7-
When the code is uploaded to the robot, the following steps occur:
7+
TODO
88

9-
* SSH/sftp operations are performed as the ``lvuser`` user (this is REALLY important, don't use the ``admin`` user!)
10-
* pyfrc does some checks to make sure the environment is setup properly
11-
* The directory containing ``robot.py`` is recursively copied to the the directory ``/home/lvuser/py``
12-
* The files ``robotCommand`` and ``robotDebugCommand`` are created
13-
* ``/usr/local/frc/bin/frcKillRobot.sh -t -r`` is called, which causes any existing robot code to be killed, and the new code is launched
9+
..
10+
This is mostly the same, but has a lot of additional steps as of 2024
1411
15-
If you wish for the code to be started up when the roboRIO boots up, you need to
16-
make sure that "Disable RT Startup App" is **not** checked in the roboRIO's web
17-
configuration.
12+
When the code is uploaded to the robot, the following steps occur:
1813

19-
These steps are compatible with what C++/Java does when deployed by GradleRIO,
20-
so you should be able to seamlessly switch between python and other FRC
21-
languages!
14+
* SSH/sftp operations are performed as the ``lvuser`` user (this is REALLY important, don't use the ``admin`` user!)
15+
* robotpy-installer does some checks to make sure the environment is setup properly
16+
* The directory containing ``robot.py`` is recursively copied to the the directory ``/home/lvuser/py``
17+
* The files ``robotCommand`` and ``robotDebugCommand`` are created
18+
* ``/usr/local/frc/bin/frcKillRobot.sh -t -r`` is called, which causes any existing robot code to be killed, and the new code is launched
19+
20+
If you wish for the code to be started up when the roboRIO boots up, you need to
21+
make sure that "Disable RT Startup App" is **not** checked in the roboRIO's web
22+
configuration.
23+
24+
These steps are compatible with what C++/Java does when deployed by GradleRIO,
25+
so you should be able to seamlessly switch between python and other FRC
26+
languages!
2227

2328
.. _manual_code_deploy:
2429

@@ -67,16 +72,12 @@ Example code:
6772
6873
print(data)
6974
70-
if __name__ == "__main__":
71-
wpilib.run(MyRobot)
72-
73-
7475
How to manually run code
7576
------------------------
7677

7778
.. note:: Generally, you shouldn't need to use this process.
7879

79-
If you don't have (or don't want) to install pyfrc, running code manually is
80+
If you don't have (or don't want) to install robotpy-installer, running code manually is
8081
pretty simple too.
8182

8283
1. Make sure you have RobotPy installed on the robot
@@ -92,4 +93,4 @@ Your driver station should be able to connect to your code, and it will be able
9293
to operate your robot!
9394

9495
.. note:: This is good for running experimental code, but it won't start the
95-
code when the robot starts up. Use pyfrc to do that.
96+
code when the robot starts up. Use robotpy-installer to do that.

dev/design.rst

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,7 @@ Design
33

44
.. _robotpy_extension_options:
55

6-
Adding options to robot.py
7-
--------------------------
6+
Adding options to the ``robotpy`` command
7+
-----------------------------------------
88

9-
When :func:`wpilib.run` is called, that function determines available commands
10-
that can be run, and parses command line arguments to pass to the commands.
11-
Examples of commands include:
12-
13-
* Running the robot code
14-
* Running the robot code, connected to a simulator
15-
* Running unit tests on the robot code
16-
* And lots more!
17-
18-
python setuptools has a feature that allows you to extend the commands available
19-
to robot.py without needing to modify WPILib's code. To add your own command,
20-
do the following:
21-
22-
* Define a setuptools entrypoint in your package's setup.py (see below)
23-
* The entrypoint name is the command to add
24-
* The entrypoint must point at an object that has the following properties:
25-
* Must have a docstring (shown when ``--help`` is given)
26-
* Constructor must take a single argument (it is an argparse parser which options can be added to)
27-
* Must have a 'run' function which takes two arguments: options, and robot_class. It must
28-
also take arbitrary keyword arguments via the ``**kwargs`` mechanism. If it receives arguments
29-
that it does not recognize, the entry point must ignore any such options.
30-
31-
If your command's run function is called, it is your command's responsibility
32-
to execute the robot code (if that is desired). This sample command
33-
demonstrates how to do this::
34-
35-
class SampleCommand:
36-
'''Help text shown to user'''
37-
38-
def __init__(self, parser):
39-
pass
40-
41-
def run(self, options, robot_class, **static_options):
42-
# runs the robot code main loop
43-
robot_class.main(robot_class)
44-
45-
To register your command as a robotpy extension, you must add the following
46-
to your setup.py setup() invocation::
47-
48-
from setuptools import setup
49-
50-
setup(
51-
...
52-
entry_points={'robotpy': ['name_of_command = package.module:CommandClassName']},
53-
...
54-
)
9+
As of 2024 the ``robotpy`` command (also accessed via ``python -m robotpy``) is located in the `robotpy-cli <https://github.com/robotpy/robotpy-cli>`__ package. Instructions for adding custom subcommands is located in the README file.

faq.rst

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Installing and Running RobotPy
2727
How do I install RobotPy?
2828
~~~~~~~~~~~~~~~~~~~~~~~~~
2929

30-
See our :ref:`getting started guide <getting_started>`.
30+
RobotPy installation documentation is now at :doc:`frc-docs <frc:docs/zero-to-robot/step-2/python-setup>`.
3131

3232
What version of Python do RobotPy projects use?
3333
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -83,6 +83,8 @@ you are a vendor, please reach out to our team and we'd be happy to assist.
8383
The RobotPy project also provides unofficial wrappers for vendor libraries that don't
8484
take a lot of effort to create and maintain.
8585

86+
.. seealso:: :doc:`frc:docs/software/vscode-overview/3rd-party-libraries`
87+
8688
Competition
8789
-----------
8890

@@ -103,10 +105,7 @@ using RobotPy since 2010, and the maintainer of RobotPy is a member of the
103105
WPILib team. Much of the time when bugs are found, they are found in the
104106
underlying WPILib, instead of RobotPy itself.
105107

106-
One caveat to this is that because RobotPy doesn't have a beta period like
107-
WPILib does, bugs tend to be found during the first half of competition season.
108-
However, by the time build season ends, RobotPy is just as stable as any of
109-
the officially suported languages.
108+
One caveat to this is that because RobotPy is not yet widely adopted, bugs tend to be found during the first half of competition season. However, by the time build season ends, RobotPy is just as stable.
110109

111110
How often does RobotPy get updated?
112111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -148,8 +147,17 @@ Ross Light, FRC Team 973. Peter is a member of the FIRST WPILib team,
148147
and also created the `ntcore <https://github.com/wpilibsuite/ntcore/>`_
149148
and `cscore <https://github.com/wpilibsuite/cscore/>`_ libraries.
150149

151-
The current RobotPy maintainer is `Dustin
152-
Spicuzza <http://github.com/virtuald>`_, also a member of the FIRST WPILib team.
150+
How is RobotPy different from WPILib?
151+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152+
153+
All current RobotPy developers are members of the FIRST WPILib team, so in some sense RobotPy is a subgroup of WPILib. However, RobotPy is still separate from WPILib in many ways and has it's own shiny logo, but as time goes on we are aiming to integrate more into the greater WPILib whole.
154+
155+
One thing that makes RobotPy different from WPILib is that we also maintain separate libraries for interacting with various 3rd party vendors, but we expect as Python gets more traction in FRC that vendors will develop and maintain their own libraries.
156+
157+
Who develops RobotPy?
158+
---------------------
159+
160+
The current RobotPy maintainer is `Dustin Spicuzza <http://github.com/virtuald>`_.
153161

154162
Current RobotPy developers include:
155163

@@ -164,6 +172,7 @@ RobotPy is an open project that all members of the FIRST community can
164172
easily and quickly contribute to. If you find a bug, or have an idea
165173
that you think others can use:
166174

175+
- Add Python documentation to :doc:`the official WPILib documentation <frc:index>`
167176
- Test and report any issues you find.
168177
- Port and test a useful library.
169178
- Write a Python module and share it with others (and contribute it to

frameworks/magicbot.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ class as your base robot class. You'll note that it's similar to
3232
'''Called when teleop starts; optional'''
3333
3434
def teleopPeriodic(self):
35-
'''Called on each iteration of the control loop'''
36-
37-
if __name__ == '__main__':
38-
wpilib.run(MyRobot)
39-
4035

4136
A robot control program can be divided into several logical parts (think
4237
drivetrain, forklift, elevator, etc). We refer to these parts as

getting_started.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)