Hi,
To customize output of autosummary, using own custom template is a good idea.
But it is hard to replace __init__ method description by __call__
method even if you're using template.
I don't have idea to realize it...
Note: To create a custom template:
1. Create a directory named autosummary under your templates path (see
your conf.py)
2. Download base template from github into the autosummary directory
https://github.com/sphinx-doc/sphinx/tree/3.x/sphinx/ext/autosummary/templates/autosummary
3. Modify the template file.
Thanks,
Takeshi KOMIYA
2020年5月12日(火) 3:10 Danylo Ulianych <[email protected]>:
>
> Hello, sphinx community,
>
> I have `kernels.py` file with the following doc header:
>
>
>
> .. autosummary::
> :toctree: toctree/kernels/
>
> RectangularKernel
>
>
> which produces
>
> .. currentmodule:: elephant.kernels
>
> .. autoclass:: RectangularKernel
>
>
> .. rubric:: Methods
>
> .. autosummary::
>
> ~RectangularKernel.__init__
>
> ...
>
>
> However, I want to show the documentation of the `RectangularKernel.__call__`
> function instead of __init__ (default by autosummary). How can I do it? I
> guess, the answer is in templates, but I don't know how to use them (sphinx
> templates documentation
> does not cover it).
> Note: I have a bunch of kernel classes (not just one) that need to be treated
> in the same way.
> Thank you.
>
> Danylo.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/6fdcf684-e0c7-470c-9bb5-99b3075d467d%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/CAFmkQAP7CBdjPZCc7xy-e5sTMnzENCaV8mjua%2BCKwvjtEm6Zpw%40mail.gmail.com.