Skip to content

Generate IcePy docstrings from the stub - #6695

Draft
externl wants to merge 1 commit into
mainfrom
icepy-docstrings-from-stub
Draft

Generate IcePy docstrings from the stub#6695
externl wants to merge 1 commit into
mainfrom
icepy-docstrings-from-stub

Conversation

@externl

@externl externl commented Sep 1, 2026

Copy link
Copy Markdown
Member

IcePy's docstrings exist in two hand-written copies — the C++ sources feeding Sphinx and help(), and the stub feeding pyright and IDEs. This makes the stub the single source and derives the other copy.

  • scripts/generateIcePyDocs.py renders every stub declaration — signature lines, prose, getset and tp_doc strings — into the committed python/modules/IcePy/DocStrings.h, which the C++ sources reference.
  • CI verifies the header is current with --check; editing the stub and regenerating is the whole doc-editing workflow.
  • The generated strings are byte-identical to what the module ships, apart from a handful of spots where the two copies had drifted (resolved in the stub's favor) and a tp_doc placeholder for IcePy.ExecutorCall.

The stub docstrings for the module-level functions come from #6609.

The stub is the single source for IcePy docstrings: generateIcePyDocs.py
renders it into the committed DocStrings.h, and CI verifies the header is
current.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant