From ae5c349cc87fe3dfcc83dfd5baff7b7a60c3bd00 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 00:34:19 +0000 Subject: [PATCH] Migrate documentation from Doxygen to Read the Docs --- .gitignore | 10 ++++++++++ .readthedocs.yaml | 28 ++++++++++++++++++++++++++++ Doxyfile | 17 ++++++++--------- docs/conf.py | 37 +++++++++++++++++++++++++++++++++++++ docs/index.rst | 17 +++++++++++++++++ docs/requirements.txt | 3 +++ 6 files changed, 103 insertions(+), 9 deletions(-) create mode 100644 .readthedocs.yaml create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/requirements.txt diff --git a/.gitignore b/.gitignore index 3b5a4e9..a0ac666 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,13 @@ *.njsproj *.sln *.vsproj + +# Python +/.venv/ + +# Sphinx +/docs/_build/ + +# Doxygen +/docs/xml/ +/docs/latex/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..b7205f9 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,28 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +# Set the OS, Python version and other tools +build: + os: ubuntu-22.04 + tools: + python: "3.9" + +# Build from the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Install Doxygen +build: + jobs: + pre_build: + - sudo apt-get update + - sudo apt-get install -y doxygen + - doxygen Doxyfile + +# Install python dependencies +python: + install: + - requirements: docs/requirements.txt diff --git a/Doxyfile b/Doxyfile index c655027..6292b64 100644 --- a/Doxyfile +++ b/Doxyfile @@ -16,17 +16,16 @@ FILE_PATTERNS = *.h *.cpp RECURSIVE = YES EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = +MACRO_EXPANSION = YES +PREDEFINED = MEDICAL_LIB_API= # HTML -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_COLORSTYLE_HUE = 220 -HTML_COLORSTYLE_SAT = 100 -HTML_COLORSTYLE_GAMMA = 80 +GENERATE_HTML = NO + +# XML +GENERATE_XML = YES +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES # Diagrams HAVE_DOT = YES diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..eb013fa --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,37 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'MedicalLib' +copyright = '2024, MedicalLib' +author = 'MedicalLib' +release = '1.0' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'breathe', +] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'furo' + +# -- Breathe configuration --------------------------------------------------- + +breathe_projects = { + "MedicalLib": "xml/", +} + +breathe_default_project = "MedicalLib" diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..3ec3068 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,17 @@ +.. MedicalLib documentation master file, created by + sphinx-quickstart on Mon Aug 19 15:21:55 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to MedicalLib's documentation! +====================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + +API Reference +------------- + +.. doxygenfile:: MedicalLib/Patient.h + :project: MedicalLib diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..8d83d66 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +sphinx +breathe +furo