Add rsync & sphinx-autobuild docs (#1391)

This commit is contained in:
Matt
2024-08-12 11:01:04 -04:00
committed by GitHub
parent ac1fc2a46b
commit c3302045d9
18 changed files with 46 additions and 40 deletions

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -17,17 +17,19 @@ You must install a set of Python dependencies in order to build the documentatio
Building the Documentation
--------------------------
In order to build the documentation, you can run the following command in the docs sub-folder:
In order to build the documentation, you can run the following command in the docs sub-folder. This will automatically build docs every time a file changes, and serves them locally at `localhost:8000` by default.
``~/photonvision/docs$ make html``
.. note:: You may have to run ``./make html`` on Windows.
``~/photonvision/docs$ sphinx-autobuild --open-browser source/_build/html``
Opening the Documentation
-------------------------
The built documentation is located at ``docs/build/html/index.html`` relative to the root project directory.
The built documentation is located at ``docs/build/html/index.html`` relative to the root project directory, or can be accessed via the local web server if using sphinx-autobuild.
Docs Builds on Pull Requests
----------------------------
Pre-merge builds of docs can be found at: ``https://photonvision-docs--PRNUMBER.org.readthedocs.build/en/PRNUMBER/index.html``. These docs are republished on every commit to a pull request made to PhotonVision/photonvision-docs. For example, PR 325 would have pre-merge documentation published to ``https://photonvision-docs--325.org.readthedocs.build/en/325/index.html``. Additionally, the pull requrest will have a link directly to the pre-release build of the docs. This build only runs when there is a change to files in the docs sub-folder.
Style Guide
-----------
PhotonVision follows the frc-docs style guide which can be found `here <https://docs.wpilib.org/en/stable/docs/contributing/style-guide.html>`_. In order to run the linter locally (which builds on doc8 and checks for compliance with the style guide), follow the instructions `on GitHub <https://github.com/wpilibsuite/ohnoyoudidnt>`_.

View File

@@ -0,0 +1,6 @@
PhotonVision Developer Documentation
====================================
.. toctree::
photonlib-backups

View File

@@ -0,0 +1,16 @@
# Photonlib Developer Docs
Our maven server is located at https://maven.photonvision.org/#/. This server runs [Reposilite](https://hub.docker.com/r/dzikoysk/reposilite) in Docker, and uses Caddy for serving requests.
## Backing up using Rsync
The Clarkson Open Source Institute at Clarkson University provides a mirror of our artifacts available [online](https://mirror.clarkson.edu/photonvision). Learn more about them at [their homepage](https://mirror.clarkson.edu/home).
Artifacts from our Maven server can also be backed up locally to a folder called `photonlib-backup` using the following command, which excludes "snapshots" for space reasons:
```
rsync -avzrHy --no-perms --no-group --no-owner --ignore-errors --exclude ".~tmp~" --exclude "snapshots/org/photonvision/photontargeting*" \
--exclude "snapshots/org/photonvision/photonlib*" maven.photonvision.org::reposilite-data \
/path/to/photonlib-backup
```

View File

@@ -3,5 +3,6 @@ Contributing to PhotonVision Projects
.. toctree::
photonvision/index
photonvision-docs/index
building-photon
building-docs
developer-docs/index

View File

@@ -1,8 +0,0 @@
Contributing to PhotonVision Documentation
==========================================
.. toctree::
building-docs
style-guide
top-contributors

View File

@@ -1,3 +0,0 @@
Style Guide
===========
PhotonVision follows the frc-docs style guide which can be found `here <https://docs.wpilib.org/en/stable/docs/contributing/style-guide.html>`_. In order to run the linter locally (which builds on doc8 and checks for compliance with the style guide), follow the instructions `on GitHub <https://github.com/wpilibsuite/ohnoyoudidnt>`_.

View File

@@ -1,5 +0,0 @@
Top Contributors
================
.. ghcontributors:: PhotonVision/photonvision-docs
:limit: 10

View File

@@ -1,7 +0,0 @@
Contributing to PhotonVision
============================
.. toctree::
build-instructions
top-contributors

View File

@@ -1,5 +0,0 @@
Top Contributors
================
.. ghcontributors:: PhotonVision/photonvision
:limit: 10

View File

@@ -31,7 +31,7 @@ Unless otherwise noted on the release page, config files should be backward comp
Installing Pre-Release Versions
-------------------------------
Pre-release/development version of PhotonVision can be tested by installing/downloading artifacts from Github Actions (see below), which are built automatically on commits to open pull requests and to PhotonVision's ``master`` branch, or by :ref:`compiling PhotonVision locally <docs/contributing/photonvision/build-instructions:Build Instructions>`.
Pre-release/development version of PhotonVision can be tested by installing/downloading artifacts from Github Actions (see below), which are built automatically on commits to open pull requests and to PhotonVision's ``master`` branch, or by :ref:`compiling PhotonVision locally <docs/contributing/building-photon:Build Instructions>`.
.. warning:: If testing a pre-release version of PhotonVision with a robot, PhotonLib must be updated to match the version downloaded! If not, packet schema definitions may not match and unexpected things will occur.

View File

@@ -19,9 +19,12 @@ Paste the following URL into the box that pops up:
.. note:: It is recommended to Build Robot Code at least once when connected to the Internet before heading to an area where Internet connectivity is limited (for example, a competition). This ensures that the relevant files are downloaded to your filesystem.
Refer to `The WPILib docs <https://docs.wpilib.org/en/stable/docs/software/vscode-overview/3rd-party-libraries.html#installing-libraries>` for more details on installing vendor libraries.
Offline Install - Java/C++
--------------------------
This installation option is currently a work-in-progress. For now, we recommend users use the online installation method.
Download the latest photonlib release from our GitHub releases page (named something like `photonlib-VERSION.zip``), and extract the contents to `$HOME/wpilib/YEAR`. This adds PhotonLib maven artifacts to your local maven repository. PhotonLib will now also appear available in the "install vendor libraries (offline)" menu in WPILib VSCode. Refer to `The WPILib docs <https://docs.wpilib.org/en/stable/docs/software/vscode-overview/3rd-party-libraries.html#installing-libraries>` for more details on installing vendor libraries offline.
Install - Python
----------------