Skip to content

Commit 5779850

Browse files
committed
Fix documentation site
- Fixes #32
1 parent 93cac53 commit 5779850

File tree

7 files changed

+35
-48
lines changed

7 files changed

+35
-48
lines changed

Diff for: commands2/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"WaitCommand",
6464
"WaitUntilCommand",
6565
"WrapperCommand",
66-
"Trigger", # was here in 2023
6766
]
6867

6968
if not TYPE_CHECKING:

Diff for: commands2/cmd.py

+19
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,22 @@ def deadline(deadline: Command, *commands: Command) -> Command:
202202
:returns: the command group
203203
"""
204204
return ParallelDeadlineGroup(deadline, *commands)
205+
206+
207+
__all__ = [
208+
"none",
209+
"runOnce",
210+
"run",
211+
"startEnd",
212+
"runEnd",
213+
"print_",
214+
"waitSeconds",
215+
"waitUntil",
216+
"either",
217+
"select",
218+
"sequence",
219+
"repeatingSequence",
220+
"parallel",
221+
"race",
222+
"deadline",
223+
]

Diff for: docs/.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
/commands2.rst
99
/commands2
1010
/commands2.button.rst
11-
/commands2.button
11+
/commands2.button
12+
/commands2.cmd.rst
13+
/commands2.cmd/
14+
/commands2.sysid.rst
15+
/commands2.sysid/

Diff for: docs/api.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ using this pattern, we recommend that you consult the Java version of the
2222
commands2
2323
commands2.button
2424
commands2.cmd
25+
commands2.sysid

Diff for: docs/conf.py

+9-22
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import os
99
from os.path import abspath, dirname
1010

11+
from importlib.metadata import version as get_version
12+
1113
# Project must be built+installed to generate docs
1214
import commands2
1315

@@ -51,25 +53,15 @@
5153
# The version info for the project you're documenting, acts as replacement for
5254
# |version| and |release|, also used in various other places throughout the
5355
# built documents.
54-
#
55-
# The short X.Y version.
56-
version = ".".join(commands2.__version__.split(".")[:2])
57-
# The full version, including alpha/beta/rc tags.
58-
release = commands2.__version__
56+
57+
release: str = get_version("robotpy-commands-v2")
58+
version: str = ".".join(release.split(".")[:2])
5959

6060
autoclass_content = "both"
6161

6262
intersphinx_mapping = {
63-
"networktables": (
64-
f"https://robotpy.readthedocs.io/projects/pynetworktables/en/{rtd_version}/",
65-
None,
66-
),
67-
"wpilib": (
68-
f"https://robotpy.readthedocs.io/projects/wpilib/en/{rtd_version}/",
69-
None,
70-
),
71-
"wpimath": (
72-
f"https://robotpy.readthedocs.io/projects/wpimath/en/{rtd_version}/",
63+
"robotpy": (
64+
f"https://robotpy.readthedocs.io/projects/robotpy/en/{rtd_version}/",
7365
None,
7466
),
7567
}
@@ -83,13 +75,7 @@
8375

8476
# -- Options for HTML output ----------------------------------------------
8577

86-
if not on_rtd: # only import and set the theme if we're building docs locally
87-
import sphinx_rtd_theme
88-
89-
html_theme = "sphinx_rtd_theme"
90-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
91-
else:
92-
html_theme = "default"
78+
html_theme = "sphinx_rtd_theme"
9379

9480
# Output file base name for HTML help builder.
9581
htmlhelp_basename = "RobotPyCommandDoc"
@@ -156,3 +142,4 @@
156142
gen_package(root, "commands2")
157143
gen_package(root, "commands2.button")
158144
gen_package(root, "commands2.cmd")
145+
gen_package(root, "commands2.sysid")

Diff for: docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
sphinx
33
sphinx-rtd-theme
44
robotpy-sphinx-plugin
5-
-e docs
5+
-e .

Diff for: docs/setup.py

-23
This file was deleted.

0 commit comments

Comments
 (0)