Doxygen using python not extracting method descriptions for files
I am documenting a python project using doxygen. I created my config file, and set the In and out Directory, but that is all I really did. When I generate the documentation it extracts the class and class hierarchy, but fo开发者_如何学Gor my modules with functions it does not.
As in, I have a .py file that has a main and a set of functions which I have documented in the correct comment syntax, but these functions are not represented in the documentation whatsoever. Why is this?
With a default doxygen configuration, module-level functions are only documented if the file or module they are in are also documented. For example:
##
# My function
#
def func():
pass
Will not be documented unless the file is documented:
##
# @file
# File documentation
#
Or the module is documented:
##
# @package MyModule Module documentation
#
For more information on documenting Python code in Doxygen, see http://www.doxygen.nl/manual/docblocks.html#pythonblocks.
Contrary to the official documentation, "special commands" are supported in docstrings. To do this the docstring must start with """!
Example:
def area(l, w):
"""! Calculate the area in sqm
@param l length
@param w width
@return area
@todo throw error if l<0 or w<0
"""
return l*w
精彩评论