feat(docs): generate reference pages from spec docstrings - #1200
Open
mzf11125 wants to merge 1 commit into
Open
Conversation
Add a doc generator that walks lean_spec.spec and emits MkDocs pages using mkdocstrings, plus a generated navigation tree. Docs stay in sync with source and no longer need manual markdown duplication. The generator skips private modules. It also fixes the mkdocstrings docstring_style option so the reference pages build. Closes leanEthereum#90
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A document generator for the Python specification. It walks
lean_spec.spec, emits one MkDocs page per module using themkdocstrings:::directive, and rewrites thenavsection ofmkdocs.yml. The reference documentation now stays in sync with the Python source and the manual markdown no longer drifts.What changed
tools/generate_docs.py, runnable viajust docs-generate.docs/reference/and aReferencesection in the navigation tree.mkdocstringsoptiondocstring_section_style: googletodocstring_style: google. The old value failed validation and blocked the build the moment any page used:::.How to verify
just checkpasses: ruff, format, typecheck, spellcheck, mdformat, and lock check.Notes
Closes #90