提交 6c29dc4f authored 作者: James Bergstra's avatar James Bergstra

merged

"""script to generate doc/oplist.txt """
__docformat__ = "restructuredtext en"
import sys
import gof
......@@ -11,6 +13,7 @@ def isOpConstructor(thing, module):
def print_title(title_string, under_char):
print title_string
print under_char * len(title_string)
print ""
def chomp(s):
"""interpret and left-align a docstring"""
......@@ -42,14 +45,14 @@ def chomp(s):
return "".join(r)
import elemwise, scalar, sparse, tensor
import scalar, sparse, tensor
print_title("Theano Op List", "~")
print ""
print ".. contents:: "
print ""
for module in [elemwise, scalar, sparse, tensor]:
for module in [scalar, sparse, tensor]:
print_title('module: `%s`' % module.__name__, '=')
print_title('Op Classes', '-')
......@@ -58,9 +61,9 @@ for module in [elemwise, scalar, sparse, tensor]:
symbol = getattr(module, symbol_name)
if isOpClass(symbol) and symbol.__module__ == module.__name__:
if isOpClass(symbol):
print ""
print "- :api:`%s.%s`" % (module.__name__, symbol_name)
print "- :api:`%s.%s`" % (symbol.__module__, symbol_name)
docstring = getattr(symbol, '__doc__', "")
if not docstring:
......@@ -77,10 +80,9 @@ for module in [elemwise, scalar, sparse, tensor]:
symbol = getattr(module, symbol_name)
if isOpConstructor(symbol, module) \
and symbol.__module__ == module.__name__:
if isOpConstructor(symbol, module):
print ""
print "- :api:`%s.%s`" % (module.__name__, symbol_name)
print "- :api:`%s.%s`" % (symbol.__module__, symbol_name)
docstring = getattr(symbol, '__doc__', "")
if not docstring:
......
......@@ -7,10 +7,36 @@
# The list of objects to document. Objects can be named using
# dotted names, module filenames, or package directory names.
# Alases for this option include "objects" and "values".
modules: *.py, gof/__init__.py,
gof/a*,
gof/c*,
gof/d*,
modules: __init__.py,
a*,
b*,
c*,
d*,
e*,
f*,
g*,
h*,
i*,
j*,
k*,
l*,
m*,
n*,
o*,
p*,
q*,
r*,
s*,
t*,
u*
v*
w*
x*
y*
z*
gof/__init__.py,
gof/[a-z]*,
gof/[A-Z]*,
gof/e*,
gof/g*,
gof/l*,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论