Documentation
Setting Up Sphinx Autobuilds
Here are the steps to set up Sphinx autobuilds so that you can check your documentation edits live.
First, navigate to your
dysh
root directory and activate thehatch
environment.
$ hatch shell
Next, tell hatch to run the docs. The docs will be published at
http://127.0.0.1:8000/
.
(dysh) $ hatch run docs
If you would like the docs to publish at a specific host and port, such as
http://thales:9876
, then add the appropriate flags:
(dysh) $ hatch run docs --host thales --port 9876
You may now make changes in the
dysh/docs/
directory and see the live changes at the appropriate URL in your browser. To close the server, simplyCTRL+C
.
Docstring Format
All Python functions must contain a docstring which follows the NumPy convention. You can learn more about this convention here: https://numpydoc.readthedocs.io/en/latest/format.html
Mermaid Diagrams
Diagrams can be directly in these text files by using the sphinxcontrib-mermaid
package. Here’s an example:
To learn more, see the package documentation. Mermaid also offers an online editor which can be used to design diagrams.