-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decide on docstring format #755
Comments
I am leaning towards markdown links because then you only have to remember one way of cross linking, and param list because it is already supported in autodoc2 without additional work |
example: https://github.com/bluesky/ophyd-async/blob/main/src/ophyd_async/core/_mock_signal_backend.py this isn't as highly maintained there are other popular alternatives, most of which use markdown |
We aren't switching away from sphinx, that's too big a jump. The question is which docstring rendering plugin within sphinx to use. sphinx-autodoc2 seems recommended by myst, it's written by a maintainer of sphinx, but hasn't attracted any other contributors yet. It is however a small codebase, and actually extensible in the application, so we can prototype much of what we want without needing a new release of it. |
In the absence of any other feedback I'll go with Param list with markdown links |
After spending 2 weeks with sphinx autodoc and autosummary I have failed to get it to document typevars properly, which means a bunch of unclickable links in the docs everytime you write
SignalDatatypeT
. This is annoying as it happens in hundreds of places, and the user generally would like to know at this point "which datatypes could I pass here?" so really needs that link.To fix, we could:
sphinx-autodoc2
I think 1. is too manual and error prone, I failed at 2. after 2 days of hacking, so I suggest 3.
It is almost working, but there is one decision to make, what format should the docstrings be?
Given that prose documents are written in markdown and look like this:
We can either write the docstring in markdown or RST, and we can format the arguments using param list, google style or numpy style. I've included a sample docstring below that we can comment on:
Numpy style with RST links
Google style with RST links
Param list with markdown links
Or any combination of the above.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: