Skip to content

Latest commit

 

History

467 Commits

Folders and files

Repository files navigation

[[TOC]]

Build Locally the HTML documentation

All aimms docs repos build the same way: with uv and the versions pinned in pyproject.toml (Sphinx 8, sphinx-aimms-theme 1.x). The CI pipeline uses exactly the same setup, so what builds here builds there.

One-time setup

  1. Install uv: winget install astral-sh.uv on Windows, or curl -LsSf https://astral.sh/uv/install.sh | sh on macOS and Linux.
  2. Run uv sync. It creates a .venv folder with Python 3.11 and the exact packages of uv.lock.

Build

uv run sphinx-build -b html . _build/html

Open _build/html/index.html in your browser. The pipeline runs the same command with -W --keep-going, which turns every warning into an error: run uv run sphinx-build -W --keep-going -b html . _build/html before you push.

Live preview: rebuilds and refreshes the browser each time you save a file.

uv run --group dev sphinx-autobuild . _build/html

Spell check: uv run sphinx-build -b spelling . _build/spelling. It needs the enchant library: included on Windows, sudo apt install libenchant-2-2 on Ubuntu, brew install enchant on macOS.

Try a theme change before it is released: in the sphinx-aimms-theme repo, run scripts\build-all-local.ps1 -Sites function-reference. It builds this repo with the theme from your folder and changes nothing here.

File names are case sensitive on Linux (the pipeline) but not on Windows, and a title underline must be at least as long as the title.

💡1: GitLab CI is following exactly the same process when building the documentation in the pipeline. This is defined in the .gitlab-ci.yml file. More details below

⚠️2: When pushing to the master branch only, the repo is built and pushed (merged) to documentation.aimms.com/language-reference/.

⚠️3: If any warning is raised on gitlab, the pipeline fails

Prereq's to build a PDF version (optional)

You can use the make latexpdf command to locally create a .pdf from the .rst source files.

First, make sure you installed Latex - https://miktex.org/howto/install-miktex

Then, to get the AIMMS code to look right, you need to run this:

python -m pip install aimms-pygments-style

This will install an extension enabling latex to find the AIMMS style sheet define in the following open source repo https://gitlab.com/ArthurdHerbemont/aimms-pygments-style. Please contribute if you think you can improve it ! :)

Releases

Packages

Contributors

Languages