From ea50aa1f4e5238710b08cc795f756e5cfd3e8724 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Tue, 31 Mar 2026 15:19:03 +0200 Subject: [PATCH] Added docs folder with conf.py, index.rst and requirements.txt and workflows --- .gitea/workflows/action.yaml | 26 +++++++++------------- docs/conf.py | 43 ++++++++++++++++++++++++++++++++++++ docs/index.rst | 22 ++++++++++++++++++ docs/requirements.txt | 5 +++++ 4 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/requirements.txt diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index 35cf7e03..dc790056 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -78,23 +78,17 @@ jobs: - name: Build Sphinx HTML working-directory: docs run: | - git fetch origin master:master || true - - python3 -m venv venv - source venv/bin/activate - - pip install --upgrade pip - pip install "Sphinx==8.2.3" myst-parser sphinx_immaterial linkify-it-py - - if [ -f requirements.txt ]; then + python3 -m venv venv + source venv/bin/activate + + pip install --upgrade pip pip install -r requirements.txt - fi - - pip install -e .. --no-deps - - sphinx-apidoc -o modules/ ../src/aare --separate --module-first --force --remove-old - - sphinx-build -b html . _build/html + + pip install -e .. --no-deps + + sphinx-apidoc -o modules/ ../src/aare --separate --module-first --force --remove-old + + sphinx-build -b html . _build/html - name: Deploy to gitea-pages branch (Gitea) env: diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..d1472a57 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,43 @@ +# 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 +import os +import sys + +sys.path.insert(0, os.path.abspath('../src')) +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'AareDAQ' +copyright = '2026, Martin Appleby, Guillaume Gotthard, Filip Leonarski and Dawn (Jiaxin) Daun' +author = 'Martin Appleby, Guillaume Gotthard, Filip Leonarski and Dawn (Jiaxin) Daun' +release = '0.3.0' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode', + 'myst_parser', +] + +templates_path = ['_templates'] +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'furo' +html_static_path = [] + +# Optional +autodoc_default_options = { + 'members': True, + 'undoc-members': True, + 'show-inheritance': True, +} diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..827ed504 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,22 @@ +.. AareDAQ documentation master file, created by + sphinx-quickstart on Tue Mar 31 14:58:01 2026. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +AareDAQ Documentation +===================== + +Welcome to the AareDAQ documentation. + +.. toctree:: + :maxdepth: 2 + :caption: Getting Started + + readme + changelog + +.. toctree:: + :maxdepth: 2 + :caption: API Reference + + api/modules diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..9ec9c8d4 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,5 @@ +Sphinx==8.2.3 +myst-parser +sphinx_immaterial +linkify-it-py +furo