This is the definitive guide for building and maintaining the documentation for the MOLE.
The MOLE documentation consists of two main components:
Before building the documentation, ensure you have:
# Ubuntu/Debian
sudo apt install doxygen
# macOS with Homebrew
brew install doxygen
# RHEL/CentOS/Fedora
sudo dnf install doxygen
# Ubuntu/Debian
sudo apt install graphviz
# macOS with Homebrew
brew install graphviz
# RHEL/CentOS/Fedora
sudo dnf install graphviz
# Ubuntu/Debian
sudo apt install python3 python3-pip python3-venv
# RHEL/CentOS/Fedora
sudo dnf install python3 python3-pip python3-virtualenv
Then set up the Python environment:
# Navigate to the documentation directory
cd doc/sphinx
# Create and activate a virtual environment (Required)
python3 -m venv .venv
source .venv/bin/activate # On Unix/MacOS
# or
.venv\Scripts\activate # On Windows
# Install required dependencies
# Either use:
make doc-deps
# Or install directly:
python3 -m pip install -r requirements.txt
# Ubuntu/Debian
sudo apt install texlive-latex-base texlive-fonts-recommended texlive-latex-extra
# RHEL/CentOS/Fedora
sudo dnf install texlive-latex
# macOS
brew install --cask mactex
All commands should be run from the doc/sphinx
directory:
# Generate API Documentation
make doc-doxygen
# Build HTML documentation
make doc-html
# PDF output (requires LaTeX)
make doc-latexpdf
# Clean build files (Doxygen + Sphinx)
make doc-clean
# Build all documentation
make doc-all
The documentation will be generated in:
doc/sphinx/build/html/
doc/sphinx/build/pdf/
doc/doxygen/
Images are automatically handled when building the documentation using the Makefile targets:
The image handling process:
doc/assets/img/
to doc/sphinx/build/html/_static/img/
If you’re running Sphinx directly without the Makefile, you’ll need to run the image copy script separately:
# Run after building documentation manually
./copy_images.sh
When contributing to documentation:
make doc-doxygen
to verify.rst
or .md
files in doc/sphinx/source/
make doc-html
to preview changesmake doc-clean
to force full rebuildPlease read our Contributing Guide before submitting documentation changes.