Adding In-repository Documentation #13
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds Sphinx-based documentation to the repository coupled with a GitHub actions workflow that builds a documentation site on new commits to the
mainbranch.Currently the documentation is a foundation for others to build upon by adding their own example workflows. There are also a few necessary additions needed to complete the documentation:
Important
The major parts currently missing from the documentation are:
univmakeUnfolderfile_properties.txtAnalysisEvent(can be removed in lieu of the table in Liang's examples)Dependencies
A few auxiliary dependencies have been added when it comes to locally building this documentation to preview your own changes. These are:
pyproject.tomlfile defines all other python package dependencies that uv will install in a virtual environment.Building
Locally (for previewing)
After uv has been installed, run
uv syncin the directory to install all dependencies. Two options are available for building the documentation:make -C docs/ dirhtml, then serve the directory withuv run python -m http.server -d docs/build/dirhtml. Open the indicated address with your web browser to preview the site.uv run sphinx-autobuild docs/source docs/build/html/ --port 1313. View the given address to see the site that is rebuilt as you edit the files.Building on GitHub
Important
GitHub Pages must be enabled for this repository for the Workflow to work properly.
The
.github/workflows/docs.ymlfile defines a GitHub workflow that should build the documentation from the repo and upload the generated site to GitHub Pages. This is triggered to run when a commit has been pushed tomain, so no additional work should be required. If you'd like the documentation to be built when a different condition is met (like when a new tag is pushed), that is also possible.Advice on Contributing
Generally
This documentation is written in reStructuredText (rST). A quick primer for it is available on the Sphinx-doc site and should account for most use-cases. rST can be a bit pedantic about syntax, so checking the output of the local build command is a good idea.
Example-Specific
Each contributed example workflow can be added in
docs/source/examples, in a standalone.rstfile. In your example file you can add the following snippet to indicate your contribution on that page: