Replies: 3 comments 3 replies
-
@jowezarek I don't think this is a proper post for discussions because there's nothing here to discuss, this is a usage question. It should be closed and deleted to keep the discussions tab on-topic. Please notice that Sphinx's GitHub issues are dedicated to reporting bugs and posting feature requests. If you have a usage question and need help such questions should be asked at Stack Overflow using the Stack Overflow questions have a Minimal, Reproducible Example requirement (on GitHub this is also generally considered an essential feature), in your case the question has several problems:
|
Beta Was this translation helpful? Give feedback.
-
Actually, it does fall into the category of Q/A. The purpose of the discussion was to let people ask questions here instead of SO where only the community would ask for help. People used to open issues with questions but we told them to ask it on SO because issues were not meant for that. However, discussions are meant for this (if they don't want to ask the question on SO). It's just that asking on both sides may help them getting an answer earlier (I personally don't look at SO questions). Now, for you question, I actually never used autosummary itself because I only use autodoc. However, I think you could generate directly the whole documentation without bothering to hard-code methods. And you could also change how it is rendered using templates. I think this post could help you: https://stackoverflow.com/questions/48074094/use-sphinx-autosummary-recursively-to-generate-api-documentation I'm only passing today so note that maintainers may not reply to Q/A that are not related to core topics. |
Beta Was this translation helpful? Give feedback.
-
@picnixz it's clear to me you haven't put enough thought into this. Almost since Sphinx exists usage Q&A has been directed to Stack Overflow - it's a long standing tradition that has served Python/Sphinx well. In fact if I remember correctly @AA-Turner wisely stated he hoped the discussion tab wouldn't start attracting usage Q&A. This has been stated policy for a decade, and I think it's the only correct choice. The reasons for this shouldn't even need be enumerated, but for the sake of discussion:
|
Beta Was this translation helpful? Give feedback.
-
I am working on a documentation for a Python library for isogeometric analysis.
My team decided to use Sphinx and was very pleased with the initial draft, but soon we noticed that maintaining the documentation is more tedious than expected.
In particular, hard coding all method and class names of a module for the
..autosummary::
directive quickly causes problems if one is not careful.An example
.rst
file of one of the submodules looks like this:The initial
.. automodule::
directive includes the docstring of the submodule at the top of the page.The following
.. autosummary::
directive includes a list of all methods and classes declared in the submodule... inhertiance-diagram::
includes an inheritance diagram. (of course)And finally, unfortunately including a duplicate module docstring, we included a detailed list of everything inside the module using
.. automodule::
once again.The issue is that we have to explicitly mention all method and class names in the
.. autosummary::
part. A:members:
option, compare with.. automodule::
, does not exist.Is there a way to automatize this process that I have overlooked while browsing stackoverflow?
Beta Was this translation helpful? Give feedback.
All reactions