source: trunk/sphinxdocs/ @ 939

Last change on this file since 939 was 939, checked in by toby, 9 years ago

fix & cleanup unit tests; add/change doc strings for sphinx; add all G2 py files to sphinx

  • Property svn:eol-style set to native
File size: 949 bytes
1'''Find Python files in GSASII that are not referenced in the sphinx documentation
3import glob
4import os.path
5import subprocess as sp
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'))]
12# loop over python files in subversion
13#for fil in glob.iglob(os.path.join(loc,'..','GSAS*.py')):
14proc = sp.Popen(["svn","list",os.path.join(loc,'..')],stdout=sp.PIPE)
15for fil in proc.stdout.readlines():
16    if os.path.splitext(fil.strip())[1] != ".py": continue
17    if os.path.splitext(os.path.split(fil)[1])[0] in documented:
18        #print 'doc'
19        continue
20    else:
21        print ".. automodule:: "+os.path.splitext(os.path.split(fil)[1])[0]
22        print "    :members: "
23        print ""
Note: See TracBrowser for help on using the repository browser.