Objective: use the provided VWCE examples (C++ and Python) to generate automated docs with Doxygen + Sphinx/MyST. Work inside your sspa-sandbox repository: copy the starter files into a personal folder codes/lab05/<name.surname>/, build docs in the sspa/docs container, and open a pull request to the teachers’ repository when done. Produce a lab log (codes/lab05/lab-notebook.md) with commands, screenshots, and short reflections. Good Git hygiene: commit early/often with clear messages, keep changes focused, and push regularly.
Exercise 1 — Prepare workspace and tools¶
Build the docs image: from
docker_images/, run./build_images.sh(ordocker build -t sspa/docs -f docs.Dockerfile .).In your
sspa-sandboxclone, create./<name.surname>/and copy the provided examples:cp -r /path/to/course/codes/lab05/{c++,python,vwce_2024.csv,fetch_vwce.sh} ./<name.surname>/Start a container mounting the sandbox repo:
docker run --rm -it -v "$PWD":/workspace -w /workspace sspa/docs bash.Inside the container, record tool versions:
doxygen --version,sphinx-build --version,python -c "import myst_parser; print(myst_parser.__version__)".
Exercise 2 — Doxygen reference for the C++ example¶
In
./<name.surname>/c++, add Doxygen-style comments tomain.cpp(briefs, params, returns, etc.).Generate a
Doxyfile(doxygen -g Doxyfile), setINPUTto the C++ folder,EXTRACT_ALL=YES,GENERATE_HTML=YES,GENERATE_LATEX=NO, and enableGENERATE_XML=YESfor Sphinx later.Run
doxygen Doxyfile; fix warnings (undocumented params, missing brief) until clean. Include a screenshot of the HTML index.Commit the C++ source +
Doxyfileto your branch with a concise message (e.g.,docs: add doxygen config for vwce cpp).
Exercise 3 — Sphinx + MyST for the Python example (and Breathe bridge)¶
In
./<name.surname>/python, add clear docstrings (Google or NumPy style) to functions inmain.pycovering parameters, returns, and examples.In
./<name.surname>/, runsphinx-quickstart docs. Enablemyst_parser,autodoc,autosummary,napoleon, andbreatheindocs/conf.py; setautosummary_generate = True.Point
breathe_projectsto the C++ Doxygen XML output so the C++ API appears in Sphinx. Add anapi.mdpage with{autosummary}for Python modules and acpp.mdpage using Breathe directives.Add a short tutorial page (
docs/tutorial.md) showing how to run the scripts and interpretvwce_gnuplot.dat; link to at least two API entries via MyST roles.Build with
sphinx-build -n -b html docs docs/_build/html; fix warnings. Commit Sphinx sources (not_build/) with a focused message (e.g.,docs: add sphinx+myst with python/cpp api).
Submission checklist¶
codes/lab05/lab-notebook.mdwith commands, notes, and screenshots of Doxygen + Sphinx HTML.Source changes committed under
codes/lab05/<name.surname>/(C++ comments + Doxyfile, Python docstrings, Sphinx/MyST pages, Breathe wiring).Open a pull request from your
sspa-sandboxfork/branch to the teachers’ repository; keep commits small and well-labeled. Ensuregit statusis clean before the PR. Mention any open issues/questions for Lecture 6.