source: trunk/sphinxdocs/find_undoc.py @ 1109

Last change on this file since 1109 was 1109, checked in by toby, 8 years ago

minor doc updates, no rebuild

  • Property svn:eol-style set to native
File size: 1014 bytes
Line 
1'''Find Python files in GSASII that are not referenced in the sphinx documentation
2'''
3import glob
4import os.path
5import subprocess as sp
6
7# get list of documented files (misses out on data files -- with no functions or classes)
8loc = os.path.split(os.path.realpath(__file__))[0]
9documented = [os.path.splitext(os.path.split(fil)[1])[0] for 
10              fil in glob.iglob(os.path.join(loc,'build/html/_modules/','*.html'))]
11                     
12# loop over python files in subversion
13proc = sp.Popen(["svn","list",os.path.join(loc,'..')],stdout=sp.PIPE)
14undoc = []
15for fil in proc.stdout.readlines():
16    fil = fil.strip()
17    print fil+'...',
18    if os.path.splitext(fil.strip())[1] != ".py": continue
19    if os.path.splitext(os.path.split(fil)[1])[0] in documented:
20        print 'doc'
21        continue
22    else:
23        print '\n'+fil+' undocumented'
24        undoc.append(fil)
25for fil in undoc:
26    print ".. automodule:: "+os.path.splitext(os.path.split(fil)[1])[0]
27    print "    :members: "
28    print ""
Note: See TracBrowser for help on using the repository browser.