Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9e66ee83
提交
9e66ee83
authored
6月 08, 2016
作者:
Francesco Visin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change documentation theme to readthedocs + add source link
上级
7534881b
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
50 行增加
和
2 行删除
+50
-2
fix_rtd.css
doc/.static/fix_rtd.css
+4
-0
conf.py
doc/conf.py
+46
-2
没有找到文件。
doc/.static/fix_rtd.css
0 → 100644
浏览文件 @
9e66ee83
/* work around https://github.com/snide/sphinx_rtd_theme/issues/149 */
.rst-content
table
.field-list
.field-body
{
padding-top
:
8px
;
}
doc/conf.py
浏览文件 @
9e66ee83
...
@@ -22,6 +22,8 @@ from __future__ import absolute_import, print_function, division
...
@@ -22,6 +22,8 @@ from __future__ import absolute_import, print_function, division
import
os
import
os
import
sys
import
sys
import
theano
theano_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
)
theano_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
)
sys
.
path
.
append
(
os
.
path
.
abspath
(
theano_path
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
theano_path
))
...
@@ -30,7 +32,11 @@ sys.path.append(os.path.abspath(theano_path))
...
@@ -30,7 +32,11 @@ sys.path.append(os.path.abspath(theano_path))
# Add any Sphinx extension module names here, as strings. They can be
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'sphinx.ext.autodoc'
,
'sphinx.ext.todo'
,
'sphinx.ext.doctest'
,
'sphinx.ext.napoleon'
]
extensions
=
[
'sphinx.ext.autodoc'
,
'sphinx.ext.todo'
,
'sphinx.ext.doctest'
,
'sphinx.ext.napoleon'
,
'sphinx.ext.linkcode'
]
todo_include_todos
=
True
todo_include_todos
=
True
napoleon_google_docstring
=
False
napoleon_google_docstring
=
False
...
@@ -103,7 +109,20 @@ pygments_style = 'sphinx'
...
@@ -103,7 +109,20 @@ pygments_style = 'sphinx'
# must exist either in Sphinx' static/ path, or in one of the custom paths
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
# given in html_static_path.
#html_style = 'default.css'
#html_style = 'default.css'
html_theme
=
'sphinxdoc'
# html_theme = 'sphinxdoc'
# Read the docs style:
if
os
.
environ
.
get
(
'READTHEDOCS'
)
!=
'True'
:
try
:
import
sphinx_rtd_theme
except
ImportError
:
pass
# assume we have sphinx >= 1.3
else
:
html_theme_path
=
[
sphinx_rtd_theme
.
get_html_theme_path
()]
html_theme
=
'sphinx_rtd_theme'
def
setup
(
app
):
app
.
add_stylesheet
(
"fix_rtd.css"
)
# The name for this set of Sphinx documents. If None, it defaults to
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# "<project> v<release> documentation".
...
@@ -165,6 +184,31 @@ html_use_smartypants = True
...
@@ -165,6 +184,31 @@ html_use_smartypants = True
# Output file base name for HTML help builder.
# Output file base name for HTML help builder.
htmlhelp_basename
=
'theanodoc'
htmlhelp_basename
=
'theanodoc'
# Options for the linkcode extension
# ----------------------------------
# Resolve function
def
linkcode_resolve
(
domain
,
info
):
def
find_source
():
# try to find the file and line number, based on code from numpy:
# https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286
obj
=
sys
.
modules
[
info
[
'module'
]]
for
part
in
info
[
'fullname'
]
.
split
(
'.'
):
obj
=
getattr
(
obj
,
part
)
import
inspect
import
os
fn
=
inspect
.
getsourcefile
(
obj
)
fn
=
os
.
path
.
relpath
(
fn
,
start
=
os
.
path
.
dirname
(
theano
.
__file__
))
source
,
lineno
=
inspect
.
getsourcelines
(
obj
)
return
fn
,
lineno
,
lineno
+
len
(
source
)
-
1
if
domain
!=
'py'
or
not
info
[
'module'
]:
return
None
try
:
filename
=
'theano/
%
s#L
%
d-L
%
d'
%
find_source
()
except
Exception
:
filename
=
info
[
'module'
]
.
replace
(
'.'
,
'/'
)
+
'.py'
tag
=
'master'
if
'dev'
in
release
else
(
'v'
+
release
)
return
"https://github.com/Theano/theano/blob/
%
s/
%
s"
%
(
tag
,
filename
)
# Options for LaTeX output
# Options for LaTeX output
# ------------------------
# ------------------------
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论