Category : python-sphinx

In our softwareteam, we try to unify how documentation of our software projects is done. Because we do C++, Doxy-formatted comments are the way to go. However, this is (as I read beforehand) not quite suitable for python code. What workflow do you use to automatically generate documentation doxystyle from your python projects? We consider ..

Read more

Let’s consider the following example: class MyClass: def __init__(self): self._x = None @property def x(self) -> Union[float, np.ndarray]: if len(self._x) == 1: return self._x[0] else: return self._x @x.setter def x(self, value: Union[float, list, np.ndarray]): self._x = np.atleast_1d(value) Any suggestion on how can I properly document the above code? I am using Sphinx and numpydoc. Thanks ..

Read more

I would like to extend sphinx extension Autosummary. What is the proper way to do this? Currently I inherit from Autosummary in conf.py: Code example: from sphinx.ext.autosummary import Autosummary class BetterAutosummary(Autosummary): _option_spec = Autosummary.option_spec.copy() _option_spec.update( { "foobar": directives.unchanged, } ) option_spec = _option_spec def run(self): # override But I’m getting Warning: file.rst:10:Error in "autosummary" directive: ..

Read more

I have tried .. autoclass:: ChatCommandHandler() with no luck to remove the signature, is this possible with an extension to make a custom option like :exclude-signature or something. my extensions: extensions = [ ‘sphinx.ext.napoleon’, ‘sphinx.ext.autodoc’, ‘sphinx.ext.intersphinx’, ‘exception_hierarchy’, ‘attributetable’, ‘silence’, ‘sphinx_autodoc_typehints’ ] first 3 are ext’s from sphinx, attributetable is a custom ext for a table ..

Read more

I want to use Sphinx to generate html documents, and although I can generate them successfully, Sphinx does not recognize elements like :param content:. Wrong document Correct document Here you can see the specific code file, using . make.bat html to generate the documentation: Shared/sphinx-document-generation at master – Andy-AO/Shared After checking the documentation of the ..

Read more

I noticed at somepoint between versions ~3.5.4 and ~4.0.1 there was a change to style of autogenerated signatures in sphinx. To be precise, before it looked like: and now it looks like: Does anyone know if it is possible to achieve the old style look in the newest version of sphinx? Source: Python..

Read more

I currently have a filestructure like asyncbing -| – search.py – someotherfiles.py docs -| – makefile – othersphinxstuff in my conf.py I do have import os import sys sys.path.insert(0, os.path.abspath(‘../asyncbing’)) In my code I do from .someotherfiles.py import MyClass, but when doing make html it throws attempted relative import with no known parent package“` Source: ..

Read more