Skip to content

docs: document C header → .pyi docstring derivation#369

Open
hunterdsp wants to merge 1 commit into
mainfrom
docs/docstring-derivation
Open

docs: document C header → .pyi docstring derivation#369
hunterdsp wants to merge 1 commit into
mainfrom
docs/docstring-derivation

Conversation

@hunterdsp

Copy link
Copy Markdown
Contributor

Summary

  • New docs/developers/docstring-derivation.md explaining the full pipeline from C /** ... */ Doxygen comments → jm regex extraction → numpy-style .pyi docstrings
  • Added to nav under "For Developers"

What's covered

  • The pipeline diagram (header → extract_doc_blocks()parse_doxygen_block()render_numpy_method_doc().pyi)
  • Supported Doxygen tags (@brief, @param, @return, @code/@endcode)
  • Concrete before/after example (AGC constructor comment → .pyi class docstring)
  • How @code blocks become runnable pytest --doctest-glob='*.pyi' CI tests
  • The manifest-drift gate (jm status --check)
  • Why the Doxygen XML pipeline is completely independent of .pyi generation

Test plan

  • Verify doc renders correctly in make docs-serve
  • Check nav entry appears under "For Developers"

🤖 Generated with Claude Code

Explains how jm extracts /** ... */ Doxygen comments from _core.h headers
using regex (no Doxygen tool), converts @brief/@param/@return/@code tags to
numpy-style docstrings, and embeds them in generated .pyi stubs.

Covers: supported tags, before/after example (C comment → .pyi), how
@code blocks become runnable CI doctests (pytest --doctest-glob='*.pyi'),
the manifest-drift gate, and why the separate Doxygen XML pipeline is
completely independent of .pyi generation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant