From 3c7a28e059b0af9ed6cf9a85ddf1e5a7acc43995 Mon Sep 17 00:00:00 2001 From: Eduard Kerkhoven Date: Sat, 17 Oct 2026 07:51:52 +0200 Subject: [PATCH] fix: read RAVEN's MATLAB functions from src/ RAVEN moved its source folders under src/. The API index looks there when the folder exists, and the submodule follows develop. --- RAVEN | 2 +- scripts/api_index.py | 3 +++ scripts/gen_api_pages_sphinx.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RAVEN b/RAVEN index 1366b44..54ee5cc 160000 --- a/RAVEN +++ b/RAVEN @@ -1 +1 @@ -Subproject commit 1366b4410f4f8d790a12ca9cc8896d67fe126ef4 +Subproject commit 54ee5cc2a5fcf553807a3aa9de87c4f6e747ce39 diff --git a/scripts/api_index.py b/scripts/api_index.py index 831affe..64f0a10 100644 --- a/scripts/api_index.py +++ b/scripts/api_index.py @@ -25,6 +25,9 @@ # can be pointed elsewhere -- e.g. at a working checkout of either toolbox -- # which is useful when a submodule cannot be moved to the tracked commit. RAVEN = Path(os.environ.get("RAVEN_DOCS_RAVEN_SRC", ROOT / "RAVEN")) +# RAVEN keeps its MATLAB functions under src/; older checkouts have them at the root. +if (RAVEN / "src").is_dir(): + RAVEN = RAVEN / "src" PYPKG = Path( os.environ.get( "RAVEN_DOCS_PYTHON_SRC", ROOT / "raven-toolbox" / "src" / "raven_toolbox" diff --git a/scripts/gen_api_pages_sphinx.py b/scripts/gen_api_pages_sphinx.py index 6400b66..f92d380 100644 --- a/scripts/gen_api_pages_sphinx.py +++ b/scripts/gen_api_pages_sphinx.py @@ -157,7 +157,7 @@ def collect_python_full() -> list[dict]: # Page rendering # # --------------------------------------------------------------------------- # def render_matlab_page(title: str, folder: str, funcs: list[dict]) -> str: - out = [f"# {title}", "", f"MATLAB functions in `RAVEN/{folder}` of the RAVEN toolbox.", "", + out = [f"# {title}", "", f"MATLAB functions in `RAVEN/src/{folder}` of the RAVEN toolbox.", "", "## Functions", "", "| Function | Summary |", "|---|---|"] for f in funcs: out.append(f"| [`{f['name']}`](#{slug(f['name'])}) | {cell(f['summary'])} |")