How to simplify folder structure when building rst files by sphinx-apidoc?

101 views
Skip to first unread message

haojie shu

unread,
Nov 26, 2020, 1:25:00 AM11/26/20
to sphinx-users
I create rst files by `sphinx-apidoc -f -o`command. Let me take one of my rst file for instance.

tensorgraph.models\_zoo.aibraintumormodel.nn.model package
==========================================================

Submodules
----------

tensorgraph.models\_zoo.aibraintumormodel.nn.model.CommonBlocks module
----------------------------------------------------------------------

.. automodule:: tensorgraph.models_zoo.aibraintumormodel.nn.model.CommonBlocks
   :members:
   :undoc-members:
   :show-inheritance:

This seems really redundancy for me after `make html`. What is perfect for me is:

model
==========================================================

CommonBlocks
----------------------------------------------------------------------

.. automodule:: tensorgraph.models_zoo.aibraintumormodel.nn.model.CommonBlocks
   :members:
   :undoc-members:
   :show-inheritance:

This is because
(1) We know the parent folder of `model` from index
(2) Submodules doesn't show anything
(3)Same as (1)
Reply all
Reply to author
Forward
0 new messages