Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rsync & sphinx-autobuild docs #1391

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ jobs:
name: image-${{ matrix.image_suffix }}
path: photonvision*.xz
release:
needs: [build-package, build-image]
needs: [build-package, build-image, combine]
runs-on: ubuntu-22.04
steps:
# Download all fat JARs
Expand Down
2 changes: 0 additions & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ build/*
.vscode/*
.idea/*
source/_build
source/_build
photon-docs/build
source/docs/_build

venv/*
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ sphinxext-remoteliteralinclude==0.4.0
stevedore==5.1.0
urllib3==2.1.0
yarg==0.1.9
sphinx-autobuild==2024.4.16
myst_parser==3.0.1
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"sphinxext.opengraph",
"sphinxcontrib.ghcontributors",
"sphinx_design",
"myst_parser",
]

# Configure OpenGraph support
Expand Down Expand Up @@ -71,6 +72,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

source_suffix = ['.rst', '.md']

def setup(app):
app.add_css_file("css/pv-icons.css")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ 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
----------------------------
Expand Down
6 changes: 6 additions & 0 deletions docs/source/docs/developer-docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PhotonVision Developer Documentation
====================================

.. toctree::

photonlib-backups
16 changes: 16 additions & 0 deletions docs/source/docs/developer-docs/photonlib-backups.md
Original file line number Diff line number Diff line change
@@ -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-packup
mcm001 marked this conversation as resolved.
Show resolved Hide resolved
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Paste the following URL into the box that pops up:

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, and extract the contents to `$HOME/wpilib/YEAR`.
mcm001 marked this conversation as resolved.
Show resolved Hide resolved
Install - Python
----------------
Add photonlibpy to `pyproject.toml`.
Expand Down
7 changes: 7 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,10 @@ PhotonVision is licensed under the `GNU GPL v3 <https://www.gnu.org/licenses/gpl
docs/additional-resources/config
docs/additional-resources/nt-api
docs/contributing/index

.. toctree::
mcm001 marked this conversation as resolved.
Show resolved Hide resolved
:maxdepth: 1
:caption: Additional Resources
:hidden:

docs/developer-docs/index
3 changes: 3 additions & 0 deletions photon-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# photon-docs

This subproject configures Gradle to build Doxygen & Javadoc HTML documentation for our other subprojects. These are published to https://javadocs.photonvision.org/ and https://cppdocs.photonvision.org/ .
Loading