Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9ac04ab4
提交
9ac04ab4
authored
3月 06, 2012
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More pep8/pyflakes
上级
e9e7ed0c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
38 行增加
和
30 行删除
+38
-30
theano-cache
bin/theano-cache
+4
-2
theano-nose
bin/theano-nose
+3
-2
conf.py
doc/conf.py
+12
-10
docgen.py
doc/scripts/docgen.py
+15
-15
setup.py
setup.py
+4
-1
没有找到文件。
bin/theano-cache
浏览文件 @
9ac04ab4
#!/usr/bin/env python
import
logging
,
os
,
sys
import
logging
import
os
import
sys
import
theano
from
theano
import
config
from
theano.gof.cc
import
get_module_cache
...
...
@@ -41,4 +44,3 @@ else:
print
'Type "theano-cache unlock" to unlock the cache directory'
print
'Type "theano-cache cleanup" to delete keys in the old format'
sys
.
exit
(
1
)
bin/theano-nose
浏览文件 @
9ac04ab4
#!/usr/bin/env python
__authors__
=
"Olivier Delalleau, Pascal Lamblin"
__contact__
=
"delallea@iro"
__authors__
=
"Olivier Delalleau, Pascal Lamblin"
__contact__
=
"delallea@iro"
"""
This script should behave the same as the `nosetests` command.
...
...
@@ -68,6 +68,7 @@ def main():
return
nose
.
main
(
addplugins
=
addplugins
)
def
help
():
help_msg
=
"""
This script behaves mostly the same as the `nosetests` command.
...
...
doc/conf.py
浏览文件 @
9ac04ab4
...
...
@@ -3,16 +3,16 @@
# theano documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 7 16:34:06 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
# This file is execfile()d with the current directory set to its containing
# directory.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
# that aren't pickleable (module imports are okay, they're removed
# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
import
sys
,
os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
...
...
@@ -21,8 +21,8 @@ import sys, os
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# Add any Sphinx extension module names here, as strings. They can be
#
extensions
coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'sphinx.ext.autodoc'
,
'sphinx.ext.todo'
]
todo_include_todos
=
True
...
...
@@ -64,11 +64,12 @@ today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directories, that shouldn't be
searched
# for source files.
# List of directories, relative to source directories, that shouldn't be
#
searched
for source files.
exclude_dirs
=
[
'images'
,
'scripts'
,
'sandbox'
]
# The reST default role (used for this markup: `text`) to use for all documents.
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
...
...
@@ -166,7 +167,8 @@ htmlhelp_basename = 'theanodoc'
latex_font_size
=
'11pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
# (source start file, target name, title, author, document class
# [howto/manual]).
latex_documents
=
[
(
'index'
,
'theano.tex'
,
'theano Documentation'
,
'LISA lab, University of Montreal'
,
'manual'
),
...
...
doc/scripts/docgen.py
浏览文件 @
9ac04ab4
...
...
@@ -4,16 +4,14 @@ import os
import
shutil
import
inspect
from
epydoc
import
docintrospecter
from
epydoc
import
docintrospecter
from
epydoc.apidoc
import
RoutineDoc
def
Op_to_RoutineDoc
(
op
,
routine_doc
,
module_name
=
None
):
routine_doc
.
specialize_to
(
RoutineDoc
)
#NB: this code is lifted from
# /u/bergstrj/pub/prefix/x86_64-unknown-linux-gnu-Fedora_release_7__Moonshine_/lib/python2.5/site-packages/epydoc
# /u/bergstrj/pub/prefix/x86_64-unknown-linux-gnu-Fedora_release_7__Moonshine_/lib/python2.5/site-packages/epydoc/docintrospecter.py
#NB: this code is lifted from epydoc/docintrospecter.py
# op should be an op instance
assert
hasattr
(
op
,
'perform'
)
...
...
@@ -32,7 +30,7 @@ def Op_to_RoutineDoc(op, routine_doc, module_name=None):
routine_doc
.
kwarg
=
kwarg
# Set default values for positional arguments.
routine_doc
.
posarg_defaults
=
[
None
]
*
len
(
args
)
routine_doc
.
posarg_defaults
=
[
None
]
*
len
(
args
)
# Set the routine's line number.
if
hasattr
(
func
,
'func_code'
):
...
...
@@ -50,8 +48,8 @@ def Op_to_RoutineDoc(op, routine_doc, module_name=None):
return
routine_doc
docintrospecter
.
register_introspecter
(
lambda
value
:
getattr
(
value
,
'__epydoc_asRoutine'
,
False
),
Op_to_RoutineDoc
,
lambda
value
:
getattr
(
value
,
'__epydoc_asRoutine'
,
False
),
Op_to_RoutineDoc
,
priority
=-
1
)
...
...
@@ -63,13 +61,17 @@ if __name__ == '__main__':
throot
=
"/"
.
join
(
sys
.
path
[
0
]
.
split
(
"/"
)[:
-
2
])
options
=
defaultdict
(
bool
)
options
.
update
(
dict
([
x
,
y
or
True
]
for
x
,
y
in
getopt
.
getopt
(
sys
.
argv
[
1
:],
'o:'
,
[
'epydoc'
,
'rst'
,
'help'
,
'nopdf'
])[
0
]))
options
.
update
(
dict
([
x
,
y
or
True
]
for
x
,
y
in
getopt
.
getopt
(
sys
.
argv
[
1
:],
'o:'
,
[
'epydoc'
,
'rst'
,
'help'
,
'nopdf'
])[
0
]))
if
options
[
'--help'
]:
print
'Usage:
%
s [OPTIONS]'
%
sys
.
argv
[
0
]
print
' -o <dir>: output the html files in the specified dir'
print
' --rst: only compile the doc (requires sphinx)'
print
' --nopdf: do not produce a PDF file from the doc, only HTML'
print
' --epydoc: only compile the api documentation (requires epydoc)'
print
' --epydoc: only compile the api documentation'
,
print
'(requires epydoc)'
print
' --help: this help'
sys
.
exit
(
0
)
...
...
@@ -94,13 +96,14 @@ if __name__ == '__main__':
if
options
[
'--all'
]
or
options
[
'--epydoc'
]:
mkdir
(
"api"
)
from
epydoc.cli
import
cli
sys
.
path
[
0
:
0
]
=
[
throot
]
#Generate HTML doc
## This causes problems with the subsequent generation of sphinx doc
#sys.argv[:] = ['', '--config', '%s/doc/api/epydoc.conf' % throot, '-o', 'api']
#from epydoc.cli import cli
#sys.argv[:] = ['', '--config', '%s/doc/api/epydoc.conf' % throot,
# '-o', 'api']
#cli()
## So we use this instead
os
.
system
(
"epydoc --config
%
s/doc/api/epydoc.conf -o api"
%
throot
)
...
...
@@ -131,6 +134,3 @@ if __name__ == '__main__':
print
'OSError:'
,
e
except
IOError
,
e
:
print
'IOError:'
,
e
setup.py
浏览文件 @
9ac04ab4
...
...
@@ -53,6 +53,7 @@ ISRELEASED = False
VERSION
=
'
%
d.
%
d.
%
d
%
s'
%
(
MAJOR
,
MINOR
,
MICRO
,
SUFFIX
)
def
git_version
():
"""
Return the sha1 of local git HEAD as a string.
...
...
@@ -86,13 +87,15 @@ def git_version():
git_revision
=
"unknown-git"
return
git_revision
def
write_version_py
(
filename
=
os
.
path
.
join
(
'theano'
,
'generated_version.py'
)):
cnt
=
"""
# THIS FILE IS GENERATED FROM THEANO SETUP.PY
short_version = '
%(version)
s'
version = '
%(version)
s'
git_revision = '
%(git_revision)
s'
full_version = '
%(version)
s.dev-
%%(git_revision)
s'
%%
{'git_revision': git_revision}
full_version = '
%(version)
s.dev-
%%(git_revision)
s'
%%
{
'git_revision': git_revision}
release =
%(isrelease)
s
if not release:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论