-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add custom docstring sections for hardware objects #947
Add custom docstring sections for hardware objects #947
Conversation
This adds two custom docstring sections:
I believe there is some "bikeshedding" to be made:
The The @meguiraun for info, I also reused the You can preview how it renders at: |
d714841
to
f064ad3
Compare
f064ad3
to
3911ebb
Compare
Nice, we should be careful with the I don't mind if we add this in the mean time, but it does mean that we will, probably, need to change it later. |
Right... I did not have the Pydantic story fully in mind. I am still not clear on how it will look like. But maybe with the Pydantic models, it will be self-documenting somehow... I do not know. I would be interested in seeing concrete examples. I guess I do not mind changing it back to something else when it is time, and anyway I doubt anyone will have time/energy to write many such docstrings before the migration : D |
I agree with @marcus-oscarsson |
Its still a very preliminary draft but it would/could look something like this:
The model could be better specified through
|
Seems like this could help, looks promising: https://pypi.org/project/autodoc_pydantic/ I close this pull request for now. |
Wow, thats seems nice. I think the |
I will try to take over #866 then, that would make more sense. |
Ok |
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes mxcube#866 GitHub: supersedes mxcube#947
General improvements to the docstrings of abstract hardware objects: * Add an `Emits` custom section for Sphinx's Napoleon extension * Fix docstrings formatting * Document some emitted signals * Move types from docstring to type hints when possible * Som formatting with `black` GitHub: supersedes #866 GitHub: supersedes #947
Done in #1116. |
No description provided.