I have a python file with functions (lib.py), without classes. Each function has the following style:
def fnc1(a,b,c):
'''
This fonction does something.
:param a: lalala
:type a: str
:param b: hahaha
:type b: int
:param c: hohoho
:type c: int
:rtype: int
'''
print a
d = b + c
return d
I just want to document each function (inputs and outputs) with Sphinx.
After doing sphinx-quickstart, I defined the path in conf.py with my lib.py. But the output HTML file (welcome page) is empty.
If I write myself in index.rst:
.. function:: func1(a,b,c)
This fonction does something.
:param a: lalala
:type a: str
:param b: hahaha
:type b: int
:param c: hohoho
:type c: int
:rtype: int
it is ok, it shows the inputs and outputs in html file. But how to do it automatically?
Normally, I think, it must to do it in lib.rst after doing sphinx-apidoc -o, but in lib.rst there is only:
lib module
==================
.. automodule:: lib
:members:
:undoc-members:
:show-inheritance:
Can somebody explain me step by step what I must do exactly?