File tree Expand file tree Collapse file tree 2 files changed +29
-8
lines changed
Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -63,6 +63,35 @@ INDEX_DST="$DOCS_SOURCE_DIR/index.md"
6363 echo ' ```'
6464} > " $INDEX_DST "
6565
66+ # === Generate modules.rst from amago package ===
67+ MODULES_RST= " $DOCS_SOURCE_DIR /modules.rst"
68+ AMAGO_SRC= " $TMP_DIR /amago-crr_k/amago"
69+
70+ echo " Generating modules.rst from $AMAGO_SRC ..."
71+
72+ {
73+ echo " API"
74+ echo " ==="
75+ echo " "
76+ echo " .. autosummary::"
77+ echo " :toctree: generated"
78+ echo " :recursive:"
79+ echo " "
80+
81+ find " $AMAGO_SRC " -type f -name ' __init__.py' | while read -r init_file; do
82+ mod_path=" ${init_file%/ __init__.py} "
83+ mod_path=" ${mod_path# " $TMP_DIR /amago-crr_k" / } "
84+ mod_path=" ${mod_path// \/ / .} "
85+
86+ # Exclude the top-level "amago" itself
87+ if [[ " $mod_path " != " amago" ]]; then
88+ echo " $mod_path "
89+ fi
90+ done | sort
91+ } > " $MODULES_RST "
92+
93+ echo " modules.rst updated."
94+
6695# === Build Sphinx docs ===
6796cd " $ROOT_DIR /docs"
6897make clean
You can’t perform that action at this time.
0 commit comments