This is my file hierarchy:
InfoRescue
|
|_ src
|
|_ _ _ includes
|
|_ _ _ _ _ i1.py
|_ _ _ _ _ i2.py
|_ _ _ _ _ init.py
|
|_ _ _ utils
|
|_ _ _ _ _ u1.py
|_ _ _ _ _ u2.py
|_ _ _ _ _ init.py
|
|_ _ _ doc
|
|_ _ _ _ _ index.rst
|_ _ _ _ _ project.rst
|_ _ _ _ _ contact.rst
|_ _ _ _ _ api
|
|_ _ _ _ _ _ _ api.rst
|_ _ _ _ _ _ _ includes.rst
|_ _ _ _ _ _ _ utils.rst
I am using Sphinx to generate the documentation. Everything related to sphinx is in doc
directory.
My index.rst:
.. InfoRescue documentation master file, created by
sphinx-quickstart on Sun Sep 15 13:52:12 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to InfoRescue's documentation!
======================================
Contents:
========
.. toctree::
:maxdepth: 2
project
api/api
contact
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
api.rst:
InfoRescue API
**********
.. toctree::
:glob:
:maxdepth: 1
**
Now inside the utils there are to .py files. Both of these files contain no class and direct code, both only contain functions. To document a function I can use .. autofunction:: utils.u1.functionName
. This is working correctly but I have to write like this for every function. Is there any short way to simply include all the functions?
Suppose both files in includes directory contain no class and function only some (direct) code. How to generate document for it i.e. which auto-directive to use ?
Also both the init.py files inside the utils and includes directory are empty. I made those two so that I can access the files inside those directory from .rst files. Is there any other approach so that I don't have to create _init_.py files?