From 4ea7f4a0c4fa1bc3445dc0024a909d0d4e930184 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Mon, 16 Mar 2026 08:45:27 +0100 Subject: [PATCH] feat(docs): replace hand-written method pages with griffe + pre-renderer pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace 136 manually maintained method documentation pages with a directive-based system where signature, parameters, and returns are auto-generated from code docstrings via griffe static AST analysis. Key changes: - Add griffe_builder.py: static AST replacement for json_builder.py — produces identical data.json without requiring package installation (~1.1s vs ~1.8s) - Add method_page_renderer.py: pre-renders method pages from api_ref frontmatter, with type names hyperlinked to API reference pages via links.json - Add migrate_method_pages.py: one-time migration that converted 136 pages to api_ref directive format, preserving hand-written Example sections - Update python_ref_builder.py: fix dedup bug that skipped recursion into duplicate-named modules (e.g. CatalogWorkspace was unreachable), add --export-links flag to export type->URL mapping for method_page_renderer - Update generate.sh and generate-single-version.sh: prefer griffe over legacy json_builder, call method_page_renderer with --links-json - Fix 9 docstrings with invalid "Args: None" pattern and 3 with missing blank lines before Args/Returns sections - Delete 12 unused Hugo shortcode/partial templates (api-ref-*, parameter*) - Add 91 unit tests (up from 33) covering griffe builder, method renderer, link resolution, frontmatter parsing, idempotency, and edge cases - Update scripts/docs/README.md with new pipeline documentation jira: trivial risk: nonprod --- scripts/script-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/script-requirements.txt b/scripts/script-requirements.txt index 4ef97b008..ae633176d 100644 --- a/scripts/script-requirements.txt +++ b/scripts/script-requirements.txt @@ -1,3 +1,5 @@ +attrs>=23.1.0 +cattrs>=23.1.0 docstring_parser~=0.15 griffe>=1.0 jinja2~=3.1