Copyright © 2010 JoshuaScotton.com. Silver theme by c.bavota & Juan Gordillo. Powered by WordPress.
I’ve been creating automatic documentation for the Entertainer project using Doxygen.
As you may know, Entertainer is written in python, so what follows is a short guide to commenting python code in a format that Doxygen will pick up.
Say you wrote the following:
class Demo:
def theDemoTest(self, testParameter):
#do something here
return 0
You can comment this in Doxygen format in the following way:
class Demo:
"""
This is a description of the Demo class
@author Joshua Scotton
@version 0.1
"""
def theDemoTest(self, testParameter):
"""
This is the very, very, very, very, very, very, very, very, very, very long description of theDemoTest!
@brief This is where you can put a brief description
@see Demo
@param testParameter String: Input Parameter is a string
@return int Returns a 0 if successful
"""
#do something here
return 0
Quick Tag List
@author
@brief
@bug
@code and @endcode
@date
@file
@package
@param
@return
@see
@todo
@version
@warning



March 19, 2008 at 12:13 am
What filter do you use in DoxyGen to make tags work?
March 19, 2008 at 12:02 pm
Hi Greg,
The setup I use for Doxygen is described in my earlier post at http://www.joshuascotton.com/main/archives/64
The filter I use is doxypy from http://code.foosel.org/doxypy and I edit the config.dox file to have the following line:
INPUT_FILTER = “python /path/to/doxypy.py”
Josh
March 27, 2009 at 12:05 pm
[...] ago Bugzilla,Doxygen,SVN y otras cosas pichulas First saved by LOCKMANakaAC | 5 days ago Doxygen comments in Python First saved by marleneref | 10 days ago I’m Ready for School to Start First saved by [...]
January 8, 2010 at 9:59 pm
Hey there. Thanks for writing up the instructions.
I followed your directions, but doxygen is failing for me. If I leave out the doxypy filter (e.g. put nothing in the INPUT_FILTER field) then I can generate documentation fine, just obviously without being able to recognize the tags. If I enable the filter, however, then the generated HTML only displays the Main Page tab (i.e. no Modules). If it matters, I’m using OSX. Any ideas?
January 8, 2010 at 10:32 pm
The version I used in the guide was v3 and I haven’t used doxygen for a while. The latest version is v4.2 so it might have changed slightly in the last year. However, here goes…
Have you got the FILTER_SOURCE_FILES set to YES? Also double check that the path to doxypy.py is correct (it’s probably different to my example on OSX).
i.e.
FILTER_SOURCE_FILES = YES
INPUT_FILTER = “python /usr/local/bin/doxypy.py”
Also from http://code.foosel.org/doxypy:
If you want to make Doxygen recognize your module docstrings, you have to add a namespace command to the docstring