0

I have a sample project:

docs/
src/
----| model/
------------| first.py
------------| second.py
----| utils
------------| some_helper.py
------------| some_organizer.py
----| io
------------| read_data.py
------------| dataset/
---------------------| lazy_dataset.py
---------------------| in_mem_dataset.py

When I use sphinx-apidoc it generates very ugly headings like this: src.some_package.some_subpackge.some_module. What I want to do is that do not repeat the previous headings in the generated ToC. Something like this is generated:

src.some_package
   - src.some_package.some_subpackage
          - src.some_package.some_subpackage.some_module

Something like this is my preference:

some_package
   - some_subpackage
          - some_module

I have tried generating api-doc using the way described here but I had no luck.

Currently I generate sphinx project using: sphinx-quickstart and then append this to the makefile:

buildapi:
    sphinx-apidoc -fMeET ../src -o api
    @echo "Auto-generation of api documentation finished. " \
          "The generated files are in 'api/'"

and insert an api.rst in docs/ folder. The content of that file is:

API Documentation
=================

Information on specific functions, classes, and methods.

.. toctree::
   :glob:

   api/*
mzjn
  • 48,958
  • 13
  • 128
  • 248
Farhood ET
  • 1,432
  • 15
  • 32

0 Answers0