Skip to content

feat(docs): generate reference pages from spec docstrings - #1200

Open
mzf11125 wants to merge 1 commit into
leanEthereum:mainfrom
mzf11125:feat/doc-generator
Open

feat(docs): generate reference pages from spec docstrings#1200
mzf11125 wants to merge 1 commit into
leanEthereum:mainfrom
mzf11125:feat/doc-generator

Conversation

@mzf11125

Copy link
Copy Markdown

Description

A document generator for the Python specification. It walks lean_spec.spec, emits one MkDocs page per module using the mkdocstrings ::: directive, and rewrites the nav section of mkdocs.yml. The reference documentation now stays in sync with the Python source and the manual markdown no longer drifts.

What changed

  • Added tools/generate_docs.py, runnable via just docs-generate.
  • Added 53 generated pages under docs/reference/ and a Reference section in the navigation tree.
  • Fixed the mkdocstrings option docstring_section_style: google to docstring_style: google. The old value failed validation and blocked the build the moment any page used :::.
  • Private modules are skipped so internal mixins do not appear in the reference.

How to verify

just docs-generate
just docs

just check passes: ruff, format, typecheck, spellcheck, mdformat, and lock check.

Notes

  • The fork diff and merged diff views described in the issue are not part of this change. They need a decision on how to structure per fork pages, so I left them out.

Closes #90

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document generator

1 participant