Updating Project Documentation
Info
LineaPy's project documentation is built with Material for MkDocs and deployed with Netlify.
To add or update project documentation, take the following steps:
-
Add or update a Markdown file in
docs/
folder. Check existing files or this reference for available features for technical writing. -
Update
mkdocs.yml
file'snav
section to surface the new/updated page. For instance, to add a new page underConcepts
section:mkdocs.ymlnav: ... - Concepts: - Artifact: concepts/artifact.md - Artifact Store: concepts/artifact-store.md ... - New Page Title: concepts/new-page.md
-
Preview the update by starting a built-in dev-server:
# Run from lineapy/docs/ mkdocs serve
-
Once content with the change(s), open a PR. The hosted documentation will be automatically rebuilt as soon as the PR gets merged.
Updating API Reference
For code documentation, first add or update docstrings using the NumPy style.
Warning
Docstrings with a different style (e.g., Google) may not render properly.
Then, run:
# Run from lineapy/docs/
python mkdocs/gen_ref_pages.py
This will automatically generate or update Markdown file(s) for API reference.
Finally, open a PR with the changes.