`sphinxext/ipython_directive.py` no longer in matplotlib
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- numpy, python
调研方向
首先运行 make html,检查 sampledoc/sphinxext/ipython_directive.py 和 sampledoc/ipython_directive.rst,然后查看警告中提到的其他文件:custom_look.rst、cheatsheet.rst 和 extensions.rst。当该指令能够与当前的 matplotlib 一起工作、报告的源位置有用、缩进和引用问题已修复,并且文档构建在没有这些错误或警告的情况下完成时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
First of all: thanks for making this great tutorial!
It doesn't work with matplotlib HEAD though, because matplotlib/sphinxext/ipython_directive.py no longer exists.
This worked for me:
cp ipython/docs/sphinxext/ipython_directive.py sampledoc/sphinxext
After that a missing import numpy as np in combination with @doctest on line 120 in sampledoc/ipython_directive.rst makes sphinx abort.
For me simply adding the missing import numpy as np doesn't work, the doctest still fails.
Is it possible to make the following error message point to the .rst file name and line number that contains np.random.rand(10,2) (instead of suggesting a bug in sphinx)?
$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.0.7
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py:908: UserWarning: This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
if warn: warnings.warn(_use_error_msg)
loading pickled environment... not yet created
building [html]: targets for 7 source files that are out of date
updating environment: 7 added, 0 changed, 0 removed
reading sources... [100%] ipython_directive
Exception occurred:
File "/Users/deil/github/sampledoc/sphinxext/ipython_directive.py", line 376, in process_output
raise RuntimeError(e)
RuntimeError: output prompt="Out[13]:" does not match out line=---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/Users/deil/github/sampledoc/<ipython-input-13-f032a6173cb5> in <module>()
----> 1 np.random.rand(10,2)
NameError: name 'np' is not defined
The full traceback has been saved in /var/folders/9v/3cf9p8mx0n1gzcsq3mw9799m0000gn/T/sphinx-err-rTVMpU.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
make: *** [html] Error 1
There's a few more small issues:
- Line 101 in sampledoc/ipython_directive.rst needs to be indented
Users/deil/github/sampledoc/custom_look.rst:6: (WARNING/2) Duplicate explicit target name: "sphinx".
/Users/deil/github/sampledoc/cheatsheet.rst:7: WARNING: undefined label: cheatsheet -literal (if the link has no caption the label must precede a section header)
/Users/deil/github/sampledoc/extensions.rst:53: WARNING: undefined label: extensions-literal (if the link has no caption the label must precede a section header)
- 主要语言
- CSS
- 星标
- 43
- 派生
- 89
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/sampledoc 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 30/100
matplotlib/sampledoc#24 ·
-
难度 3/5 1-2 天 新手友好度 30/100
matplotlib/sampledoc#22 · 6 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 20/100
matplotlib/sampledoc#16 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
matplotlib/sampledoc#12 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
matplotlib/sampledoc#11 · 3 条评论 ·
查看 matplotlib/sampledoc 的全部 Issue
相似的 Issue
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
-
priority: p3
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/librarian#7636 ·
-
Bug v3
难度 2/5 1-3 小时 新手友好度 86/100
-
package-update
难度 2/5 1-3 小时 新手友好度 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 条评论 ·
-
Builders
难度 2/5 1-3 小时 新手友好度 72/100