Error of `make html` to build API reference
未关闭
还没有人认领这个 Issue。
bug
documentation
infrastructure
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
I was following the guide to build the API reference. Took me a while to debug the make html to build api reference in apidoc folder on macOS. Error message:
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*.py
sed: 1: "../../packages/python/p ...": invalid command code .
make: *** [html] Error 1
The problem was that the sed commands in the apidoc/Makefile don't work on macOS. You'll need to edit the Makefile to replace commands like
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*.py
with
sed -i '' -e 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*.py
Why?
On the OSX version of sed, the -i option expects an extension argument so your command is actually parsed as the extension argument and the file path is interpreted as the command code.
See this thread for details.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 apidoc/Makefile 开始,检查 html 目标使用的 sed 命令。在 macOS 上运行 make html 以复现故障,然后验证使用兼容 macOS 的命令可以成功构建 API 参考文档。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- build-system, documentation
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100