Add documentation. (#321)

Add documentation that covers:

- Prediction
- Measuremnt
- REST API

Add Python scripts that support automatic documentation generation using the Sphinx
sphinxcontrib.eval extension.

Add automatic update/ test for REST API documentation.

Filter proxy endpoints from REST API documentation.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2025-01-03 00:31:20 +01:00
committed by GitHub
parent 4cb6dc7270
commit 1866055478
27 changed files with 7565 additions and 6131 deletions

View File

@@ -17,6 +17,7 @@ help:
@echo " docker-build - Rebuild docker image"
@echo " docs - Generate HTML documentation (in build/docs/html/)."
@echo " read-docs - Read HTML documentation in your browser."
@echo " clean-docs - Remove generated documentation.""
@echo " run - Run FastAPI production server in the virtual environment."
@echo " run-dev - Run FastAPI development server in the virtual environment (automatically reloads)."
@echo " dist - Create distribution (in dist/)."
@@ -52,13 +53,6 @@ dist: pip
# Target to generate HTML documentation
docs: pip-dev
mkdir -p docs/develop
cp README.md docs/develop/getting_started.md
# remove top level header and coresponding description
sed -i '/^##[^#]/,$$!d' docs/develop/getting_started.md
sed -i "1i\# Getting Started\n" docs/develop/getting_started.md
cp CONTRIBUTING.md docs/develop
sed -i "s/README.md/getting_started.md/g" docs/develop/CONTRIBUTING.md
.venv/bin/sphinx-build -M html docs build/docs
@echo "Documentation generated to build/docs/html/."
@@ -67,12 +61,17 @@ read-docs: docs
@echo "Read the documentation in your browser"
.venv/bin/python -m webbrowser build/docs/html/index.html
# Clean target to remove generated documentation, distribution and virtual environment
clean:
@echo "Cleaning virtual env, distribution and build directories"
rm -rf dist build .venv
# Clean target to remove generated documentation and documentation artefacts
clean-docs:
@echo "Searching and deleting all '_autosum' directories in docs..."
@find docs -type d -name '_autosummary' -exec rm -rf {} +;
@echo "Cleaning docs build directories"
rm -rf build/docs
# Clean target to remove generated documentation, distribution and virtual environment
clean: clean-docs
@echo "Cleaning virtual env, distribution and build directories"
rm -rf build .venv
@echo "Deletion complete."
run: