Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
Docs
提交
ead36e47
D
Docs
项目概览
MegEngine 天元
/
Docs
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ead36e47
编写于
7月 03, 2020
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(scripts): fix some typo
GitOrigin-RevId: fe3b6b3ceb6ecd2f861329f5b5c75589f206b36f
上级
82738b71
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
8 deletion
+10
-8
README.md
README.md
+3
-3
gen_python_docs/gen_html.sh
gen_python_docs/gen_html.sh
+7
-5
未找到文件。
README.md
浏览文件 @
ead36e47
...
...
@@ -29,7 +29,7 @@
The script accepts the MegEngine installation and MegBrain clone path as the argument.
```bash
./gen_python_docs/gen_html.sh $MG
E_ROOT $MEB_ROOT
./gen_python_docs/gen_html.sh $MG
B_ROOT $MGE_ROOT(optional)
```
Note that the RST files generated from python docstring are put under `source/autogen`.
...
...
@@ -55,7 +55,7 @@
API docstring also contains examples written by
[
doctest
](
https://docs.python.org/3/library/doctest.html
)
. Run the tests by
```
bash
gen_python_docs/gen_html.sh
~/.local/lib/python3.6/site-packages
$MEB_ROOT
gen_python_docs/gen_html.sh
$MGB_ROOT
~/.local/lib/python3.6/site-packages/megengine
sphinx-build
-b
doctest
source
build/doctest
```
...
...
@@ -87,4 +87,4 @@ find the class rst file and copy its name and replace the doc with
find the file and copy its name and replace the doc with
```
:ref:`file_file_<filename>`
```
\ No newline at end of file
```
gen_python_docs/gen_html.sh
浏览文件 @
ead36e47
...
...
@@ -8,10 +8,12 @@ rm -rf source/cpp_api
set
-e
if
[
!
-n
"
$
2
"
]
if
[
!
-n
"
$
1
"
]
then
echo
"MegBrain directory not provided"
exit
1
else
MGB_ROOT
=
$1
fi
exec
3<
"source/include/h_file.txt"
...
...
@@ -20,15 +22,15 @@ exec 4<"source/include/h_location.txt"
while
read
line1<&3
&&
read
line2<&4
do
mkdir
-p
"source/include/file
${
line2
%/*
}
"
cp
${
2
}${
line1
}
"source/include/file
${
line2
%/*
}
"
cp
${
MGB_ROOT
}${
line1
}
"source/include/file
${
line2
%/*
}
"
done
if
[
!
-n
"
$
1
"
]
;
then
if
[
!
-n
"
$
2
"
]
;
then
MGE_ROOT
=
`
python3
-c
"import os;
\
import megengine;
\
print(os.path.dirname(megengine.__file__))"
`
else
MGE_ROOT
=
$
1
MGE_ROOT
=
$
2
fi
./gen_python_docs/gendoc.sh
$MGE_ROOT
...
...
@@ -45,4 +47,4 @@ export API_DIR="api_zh"
rm
-rf
build/html/api
mkdir
build/html/api
cp
.tmp/
*
build/html/api
rm
-rf
.tmp
\ No newline at end of file
rm
-rf
.tmp
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录