http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11468

Revision: 11468
Author:   drtrigon
Date:     2013-04-27 09:51:46 +0000 (Sat, 27 Apr 2013)
Log Message:
-----------
bug fix; solve windows issue in r11462
improvement; enable the use of doxypy if available

Modified Paths:
--------------
    trunk/pywikipedia/Doxyfile
    trunk/pywikipedia/maintenance/release.py

Modified: trunk/pywikipedia/Doxyfile
===================================================================
--- trunk/pywikipedia/Doxyfile  2013-04-27 07:34:04 UTC (rev 11467)
+++ trunk/pywikipedia/Doxyfile  2013-04-27 09:51:46 UTC (rev 11468)
@@ -1634,3 +1634,18 @@
 # the various graphs.
 
 DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to doxypy (http://code.foosel.org/doxypy)
+#---------------------------------------------------------------------------
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the doxypy input filter (if set
+# using INPUT_FILTER) will be used to filter the input files when producing
+# docs. The doxypy filter reformats python comments to conform to doxygen
+# documentation blocks. This makes it possible to use the Doxygen/Javadoc
+# syntax inside of docstrings when writing code documentation and automatically
+# generate API documentation out of it instead of being forced to use non-
+# python documentation blocks or to document code redundantly. 
+
+#FILTER_SOURCE_FILES = YES
+#INPUT_FILTER = "python docs/doxypy.py"

Modified: trunk/pywikipedia/maintenance/release.py
===================================================================
--- trunk/pywikipedia/maintenance/release.py    2013-04-27 07:34:04 UTC (rev 
11467)
+++ trunk/pywikipedia/maintenance/release.py    2013-04-27 09:51:46 UTC (rev 
11468)
@@ -3,7 +3,10 @@
 performing several actions:
 
 * create docs from docstrings in HTML and LaTeX (PDF) format
-  [doxygen]
+  [doxygen & doxypy]
+  (enable doxypy by downloading doxypy.py from http://code.foosel.org/doxypy,
+   placing it into the docs/ folder and uncommenting the doxypy related lines
+   in Doxygen config file)
 * run unittests
   [nosetests]
 * create coverage report in HTML format
@@ -22,7 +25,7 @@
 __version__ = '$Id$'
 #
 
-import sys, os
+import sys, os, time
 
 scriptdir = os.path.dirname(sys.argv[0])
 if not os.path.isabs(scriptdir):
@@ -36,8 +39,12 @@
 
 
 print '* create docs from docstrings in HTML and LaTeX (PDF) format\n' \
-      '  [doxygen]'
-os.system('date > %s' % os.path.join(docsdir, 'release-doxygen.log'))
+      '  [doxygen & doxypy]\n' \
+      '  (enable doxypy by downloading doxypy.py from 
http://code.foosel.org/doxypy,\n' \
+      '   placing it into the docs/ folder and uncommenting the doxypy related 
lines\n' \
+      '   in Doxygen config file)'
+with open(os.path.join(docsdir, 'release-doxygen.log'), 'w') as f:
+    f.write('%s\n' % time.asctime())
 os.system('doxygen &>> %s' % os.path.join(docsdir, 'release-doxygen.log'))
 
 
@@ -50,7 +57,8 @@
 #""")
 #os.system('date > ../output/test_pywikipedia.txt')
 #os.system('nosetests --with-xunit 
--xunit-file=../output/xunit_pywikipedia.xml tests 2>> 
../output/test_pywikipedia.txt')
-os.system('date > %s' % os.path.join(docsdir, 'release-nosetests.log'))
+with open(os.path.join(docsdir, 'release-nosetests.log'), 'w') as f:
+    f.write('%s\n' % time.asctime())
 os.system('nosetests 2>> %s' % os.path.join(docsdir, 'release-nosetests.log'))
 
 


_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn

Reply via email to