Skip to content

Add runtime docstrings to stubs in release wheels - #1274

Open
jonathanberthias wants to merge 3 commits into
scipopt:masterfrom
jonathanberthias:typing/wheel-docstrings
Open

jonathanberthias wants to merge 3 commits into
scipopt:masterfrom
jonathanberthias:typing/wheel-docstrings

Conversation

@jonathanberthias

@jonathanberthias jonathanberthias commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The bundled type stubs contain no docstrings, so editors using them can miss the documentation available on the compiled extension.

This PR copies existing runtime docstrings into the stubs during release wheel builds using docstring-adder. It runs after native libraries are bundled and repacks the wheel with updated file hashes. This applies to Python 3.10 and later, as required by docstring-adder.

The implementation was generated with AI assistance.

Part of #1072

@Joao-Dionisio

Copy link
Copy Markdown
Member

The implementation was generated with AI assistance.

Thank you so much for the disclosure, @jonathanberthias ! I'm assuming you reviewed the changes already, correct?

@jonathanberthias

Copy link
Copy Markdown
Contributor Author

Thank you so much for the disclosure, @jonathanberthias ! I'm assuming you reviewed the changes already, correct?

I ran the build workflow on my fork and it seems to work, but I know very little about cibuildwheel so perhaps there's a better way. This was done by Sol 6.1, maybe if you have access to other models they can come up with different ideas 🤷

This branch has not been deployed

No deployments
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.

2 participants