Open foosel opened 2 years ago
Issues with mkdocstrings:
gen_ref_pages.py
however helps here (regexes with additional options for mkdocstrings), see here and here.PluginSettings
. The getters and setters are implemented dynamically through __getattr__
. It might work through a simple list, but that's ugly, doesn't integrate with the toc and is overall just meh.So I got the idea to check out Myst and sphinx-autodoc2. And at first things look good, but alas, sphinx-autodoc2
currently doesn't support our Google docstrings, e.g.
Arguments
foo (str): doc for foo
Returns:
(str): Some return value
It only supports Sphinx based parameter docs, e.g.
:param str foo: doc for foo
:rtype str:
:return: Some return value
That's obviously less readable, and thus would be a step backwards. So for now we'd not be able to use Markdown in the docstrings, which would then get us back to having to write Restructured Text, and this whole exercise here is about getting rid of rSt for good.
I'm starting to feel the tooling might not yet be fully there. I'll tinker around with both a bit more to see if I can find solutions for either one that will work for OctoPrint.
Sub tasks (still building up, in no way to be considered exhaustive yet):
Migration of docstrings happens in 'improve/mkdocs' branch of OctoPrint/OctoPrint. Current preview available at octoprint.github.io/docs.
Open questions: