parent
56f06a2dcd
commit
a048348104
11 changed files with 1 additions and 453 deletions
@ -1,53 +0,0 @@ |
|||||||
# Minimal makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
OPENPILOT_ROOT = `git rev-parse --show-toplevel`
|
|
||||||
|
|
||||||
# You can set these variables from the command line, and also
|
|
||||||
# from the environment for the first two.
|
|
||||||
SPHINXOPTS ?=
|
|
||||||
SPHINXBUILD ?= sphinx-build
|
|
||||||
DOCSDIR = "$(OPENPILOT_ROOT)/docs"
|
|
||||||
SOURCEDIR = "$(OPENPILOT_ROOT)/build/docs"
|
|
||||||
DOCSBUILDDIR = "$(OPENPILOT_ROOT)/build/docs"
|
|
||||||
BUILDDIR = "$(OPENPILOT_ROOT)/build"
|
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
|
||||||
help: |
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(DOCSBUILDDIR)" $(SPHINXOPTS) $(O)
|
|
||||||
|
|
||||||
clean: |
|
||||||
@echo "Cleaning build folder..."
|
|
||||||
rm -rf "$(BUILDDIR)"
|
|
||||||
|
|
||||||
.PHONY: help Makefile |
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
||||||
%: Makefile |
|
||||||
@echo "Cleaning build folder..."
|
|
||||||
rm -rf "$(BUILDDIR)"
|
|
||||||
mkdir -p "$(DOCSBUILDDIR)"
|
|
||||||
|
|
||||||
@echo "Copying docs & config to build folder..."
|
|
||||||
cp -a "$(DOCSDIR)" "$(BUILDDIR)"
|
|
||||||
cd "$(OPENPILOT_ROOT)" && \
|
|
||||||
find . -type f \( -name "*.md" -o -name "*.rst" -o -name "*.png" -o -name "*.jpg" -o -name "*.svg" \) \
|
|
||||||
-not -path "*/.*" \
|
|
||||||
-not -path "./build/*" \
|
|
||||||
-not -path "./docs/*" \
|
|
||||||
-not -path "./xx/*" \
|
|
||||||
-exec cp --parents "{}" ./build/docs/ \;
|
|
||||||
|
|
||||||
@echo "Building rst files..."
|
|
||||||
sphinx-apidoc -o "$(DOCSBUILDDIR)" ../ \
|
|
||||||
../xx ../rednose_repo ../notebooks ../panda_jungle \
|
|
||||||
../third_party \
|
|
||||||
../panda/examples \
|
|
||||||
../scripts \
|
|
||||||
../selfdrive/modeld \
|
|
||||||
../selfdrive/debug \
|
|
||||||
$(shell find .. -type d -name "*test* -not -path "**.venv**" \")
|
|
||||||
|
|
||||||
@echo "Building html files..."
|
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(DOCSBUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@ -1,3 +0,0 @@ |
|||||||
version https://git-lfs.github.com/spec/v1 |
|
||||||
oid sha256:d2802090da910c4ca103d8ef664f5bdc671e6035890ec7c41c1c6b9a5675294e |
|
||||||
size 15086 |
|
@ -1,3 +0,0 @@ |
|||||||
version https://git-lfs.github.com/spec/v1 |
|
||||||
oid sha256:42bc589954cad7f16cef694887dee2c819378f7dacfdddea2ff833ff65a109fd |
|
||||||
size 1122 |
|
@ -1,2 +0,0 @@ |
|||||||
User-agent: * |
|
||||||
Sitemap: https://docs.comma.ai/sitemap.xml |
|
@ -1,87 +0,0 @@ |
|||||||
openpilot |
|
||||||
========== |
|
||||||
|
|
||||||
|
|
||||||
opendbc |
|
||||||
------ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: opendbc_can |
|
||||||
|
|
||||||
|
|
||||||
cereal |
|
||||||
------ |
|
||||||
|
|
||||||
messaging |
|
||||||
^^^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: msgq_repo_msgq |
|
||||||
|
|
||||||
visionipc |
|
||||||
^^^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: msgq_repo_msgq_visionipc |
|
||||||
|
|
||||||
|
|
||||||
selfdrive |
|
||||||
--------- |
|
||||||
|
|
||||||
camerad |
|
||||||
^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: system_camerad_cameras |
|
||||||
|
|
||||||
locationd |
|
||||||
^^^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_locationd |
|
||||||
|
|
||||||
ui |
|
||||||
^^ |
|
||||||
|
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_ui |
|
||||||
|
|
||||||
replay |
|
||||||
"""""" |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: tools_replay |
|
||||||
|
|
||||||
qt |
|
||||||
"" |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_ui_qt_offroad |
|
||||||
|
|
||||||
proclogd |
|
||||||
^^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: system_proclogd |
|
||||||
|
|
||||||
modeld |
|
||||||
^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_modeld_transforms |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_modeld_models |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_modeld_runners |
|
||||||
|
|
||||||
common |
|
||||||
^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: common |
|
||||||
|
|
||||||
sensorsd |
|
||||||
^^^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: system_sensord_sensors |
|
||||||
|
|
||||||
pandad |
|
||||||
^^^^^^ |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: selfdrive_pandad |
|
||||||
|
|
||||||
|
|
||||||
rednose |
|
||||||
------- |
|
||||||
.. autodoxygenindex:: |
|
||||||
:project: rednose_repo_rednose_helpers |
|
@ -1,147 +0,0 @@ |
|||||||
# type: ignore |
|
||||||
|
|
||||||
# Configuration file for the Sphinx documentation builder. |
|
||||||
# |
|
||||||
# This file only contains a selection of the most common options. For a full |
|
||||||
# list see the documentation: |
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html |
|
||||||
|
|
||||||
# -- Path setup -------------------------------------------------------------- |
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory, |
|
||||||
# add these directories to sys.path here. If the directory is relative to the |
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here. |
|
||||||
# |
|
||||||
import os |
|
||||||
import sys |
|
||||||
from os.path import exists |
|
||||||
|
|
||||||
from openpilot.common.basedir import BASEDIR |
|
||||||
from openpilot.system.version import get_version |
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.')) |
|
||||||
sys.path.insert(0, os.path.abspath('..')) |
|
||||||
|
|
||||||
VERSION = get_version() |
|
||||||
|
|
||||||
|
|
||||||
# -- Project information ----------------------------------------------------- |
|
||||||
|
|
||||||
project = 'openpilot docs' |
|
||||||
copyright = '2021, comma.ai' # noqa: A001 |
|
||||||
author = 'comma.ai' |
|
||||||
version = VERSION |
|
||||||
release = VERSION |
|
||||||
language = 'en' |
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration --------------------------------------------------- |
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be |
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
|
||||||
# ones. |
|
||||||
extensions = [ |
|
||||||
'sphinx.ext.autodoc', # Auto-generate docs |
|
||||||
'sphinx.ext.viewcode', # Add view code link to modules |
|
||||||
'sphinx_rtd_theme', # Read The Docs theme |
|
||||||
'myst_parser', # Markdown parsing |
|
||||||
'breathe', # Doxygen C/C++ integration |
|
||||||
'sphinx_sitemap', # sitemap generation for SEO |
|
||||||
] |
|
||||||
|
|
||||||
myst_html_meta = { |
|
||||||
"description": "openpilot docs", |
|
||||||
"keywords": "op, openpilot, docs, documentation", |
|
||||||
"robots": "all,follow", |
|
||||||
"googlebot": "index,follow,snippet,archive", |
|
||||||
"property=og:locale": "en_US", |
|
||||||
"property=og:site_name": "docs.comma.ai", |
|
||||||
"property=og:url": "https://docs.comma.ai", |
|
||||||
"property=og:title": "openpilot Documentation", |
|
||||||
"property=og:type": "website", |
|
||||||
"property=og:image:type": "image/jpeg", |
|
||||||
"property=og:image:width": "400", |
|
||||||
"property=og:image": "https://docs.comma.ai/_static/logo.png", |
|
||||||
"property=og:image:url": "https://docs.comma.ai/_static/logo.png", |
|
||||||
"property=og:image:secure_url": "https://docs.comma.ai/_static/logo.png", |
|
||||||
"property=og:description": "openpilot Documentation", |
|
||||||
"property=twitter:card": "summary_large_image", |
|
||||||
"property=twitter:logo": "https://docs.comma.ai/_static/logo.png", |
|
||||||
"property=twitter:title": "openpilot Documentation", |
|
||||||
"property=twitter:description": "openpilot Documentation" |
|
||||||
} |
|
||||||
|
|
||||||
html_baseurl = 'https://docs.comma.ai/' |
|
||||||
sitemap_filename = "sitemap.xml" |
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory. |
|
||||||
templates_path = ['_templates'] |
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and |
|
||||||
# directories to ignore when looking for source files. |
|
||||||
# This pattern also affects html_static_path and html_extra_path. |
|
||||||
exclude_patterns = [] |
|
||||||
|
|
||||||
|
|
||||||
# -- c docs configuration --------------------------------------------------- |
|
||||||
|
|
||||||
# Breathe Configuration |
|
||||||
# breathe_default_project = "c_docs" |
|
||||||
breathe_build_directory = f"{BASEDIR}/build/docs/html/xml" |
|
||||||
breathe_separate_member_pages = True |
|
||||||
breathe_default_members = ('members', 'private-members', 'undoc-members') |
|
||||||
breathe_domain_by_extension = { |
|
||||||
"h": "cc", |
|
||||||
} |
|
||||||
breathe_implementation_filename_extensions = ['.c', '.cc'] |
|
||||||
breathe_doxygen_config_options = {} |
|
||||||
breathe_projects_source = {} |
|
||||||
|
|
||||||
# only document files that have accompanying .cc files next to them |
|
||||||
print("searching for c_docs...") |
|
||||||
for root, _, files in os.walk(BASEDIR): |
|
||||||
found = False |
|
||||||
breath_src = {} |
|
||||||
breathe_srcs_list = [] |
|
||||||
|
|
||||||
for file in files: |
|
||||||
ccFile = os.path.join(root, file)[:-2] + ".cc" |
|
||||||
|
|
||||||
if file.endswith(".h") and exists(ccFile): |
|
||||||
f = os.path.join(root, file) |
|
||||||
|
|
||||||
parent_dir_abs = os.path.dirname(f) |
|
||||||
parent_dir = parent_dir_abs[len(BASEDIR) + 1:] |
|
||||||
parent_project = parent_dir.replace('/', '_') |
|
||||||
print(f"\tFOUND: {f} in {parent_project}") |
|
||||||
|
|
||||||
breathe_srcs_list.append(file) |
|
||||||
found = True |
|
||||||
|
|
||||||
if found: |
|
||||||
breath_src[parent_project] = (parent_dir_abs, breathe_srcs_list) |
|
||||||
breathe_projects_source.update(breath_src) |
|
||||||
|
|
||||||
print(f"breathe_projects_source: {breathe_projects_source.keys()}") |
|
||||||
|
|
||||||
# -- Options for HTML output ------------------------------------------------- |
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for |
|
||||||
# a list of builtin themes. |
|
||||||
# |
|
||||||
html_theme = 'sphinx_rtd_theme' |
|
||||||
html_show_copyright = True |
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here, |
|
||||||
# relative to this directory. They are copied after the builtin static files, |
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css". |
|
||||||
html_static_path = ['_static'] |
|
||||||
html_logo = '_static/logo.png' |
|
||||||
html_favicon = '_static/favicon.ico' |
|
||||||
html_theme_options = { |
|
||||||
'logo_only': False, |
|
||||||
'display_version': True, |
|
||||||
'vcs_pageview_mode': 'blob', |
|
||||||
'style_nav_header_background': '#000000', |
|
||||||
} |
|
||||||
html_extra_path = ['_static'] |
|
@ -1,42 +0,0 @@ |
|||||||
# openpilot Documentation |
|
||||||
|
|
||||||
```{include} README.md |
|
||||||
``` |
|
||||||
|
|
||||||
```{toctree} |
|
||||||
:caption: 'General' |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
CARS.md |
|
||||||
CONTRIBUTING.md |
|
||||||
INTEGRATION.md |
|
||||||
LIMITATIONS.md |
|
||||||
SAFETY.md |
|
||||||
``` |
|
||||||
|
|
||||||
```{toctree} |
|
||||||
:caption: 'Overview' |
|
||||||
:maxdepth: 2 |
|
||||||
|
|
||||||
overview.rst |
|
||||||
``` |
|
||||||
|
|
||||||
## API Documentation |
|
||||||
|
|
||||||
- {ref}`genindex` |
|
||||||
- {ref}`modindex` |
|
||||||
- {ref}`search` |
|
||||||
|
|
||||||
```{toctree} |
|
||||||
:caption: 'Python API' |
|
||||||
:maxdepth: 2 |
|
||||||
|
|
||||||
modules.rst |
|
||||||
``` |
|
||||||
|
|
||||||
```{toctree} |
|
||||||
:caption: 'C/C++ API' |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
c_docs.rst |
|
||||||
``` |
|
@ -1,72 +0,0 @@ |
|||||||
openpilot |
|
||||||
========= |
|
||||||
|
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
Debugging <selfdrive/debug/README.md> |
|
||||||
system/loggerd/README.md |
|
||||||
Driver Monitoring <selfdrive/monitoring/README.md> |
|
||||||
Process Replay <selfdrive/test/process_replay/README.md> |
|
||||||
|
|
||||||
cereal |
|
||||||
========= |
|
||||||
|
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
cereal/README.md |
|
||||||
cereal/messaging/msgq.md |
|
||||||
|
|
||||||
models |
|
||||||
========= |
|
||||||
|
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
models/README.md |
|
||||||
|
|
||||||
opendbc |
|
||||||
========= |
|
||||||
|
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
opendbc/README.md |
|
||||||
|
|
||||||
panda |
|
||||||
========= |
|
||||||
|
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
panda/README.md |
|
||||||
panda/UPDATING.md |
|
||||||
panda/board/README.md |
|
||||||
panda/drivers/linux/README.md |
|
||||||
panda/drivers/windows/README.md |
|
||||||
|
|
||||||
|
|
||||||
rednose |
|
||||||
========= |
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
rednose_repo/README.md |
|
||||||
|
|
||||||
|
|
||||||
tools |
|
||||||
========= |
|
||||||
.. toctree:: |
|
||||||
:maxdepth: 4 |
|
||||||
|
|
||||||
tools/CTF.md |
|
||||||
tools/joystick/README.md |
|
||||||
tools/lib/README.md |
|
||||||
tools/plotjuggler/README.md |
|
||||||
tools/replay/README.md |
|
||||||
tools/serial/README.md |
|
||||||
Simulator <tools/sim/README.md> |
|
||||||
tools/ssh/README.md |
|
||||||
Webcam <tools/webcam/README.md> |
|
||||||
tools/cabana/README.md |
|
Loading…
Reference in new issue