sphinx、buildbot(和代码覆盖率)。他们如何整合?

发布于 2024-10-20 08:54:02 字数 599 浏览 11 评论 0 原文

我有一个不那么小的 python 包,有相当多的历史,用文档字符串记录。在其开发过程中,我们引入了 buildbot 以及后来的 詹金斯/哈德森。最近,我在我的 buildbot.cfg 中添加了一个 sphinx 配方,以便收集来自来源的文档并保持最新的可通过网络访问的文档。

到目前为止,一切都很好:每次我提交更改时,Jenkins 都会广泛检查包,生成非常完整的概述并更新我们的文档站点。

我启用的 sphinx 扩展之一:覆盖率,用于文档覆盖率报告,目前尚未记录。

我在 buildbot 生成的环境中执行 sphinx,并且 我似乎无法将覆盖率统计数据包含在 sphinx 生成的文档站点中!

有什么提示吗?

I have a not-so-small python package, with quite some history, documented with docstrings. During its development we introduced buildbot and later on Jenkins/Hudson. Recently I added a sphinx recipe to my buildbot.cfg, in order to collect the documentation from the sources and keep up to date web accessible docs.

so far, so good: each time I commit a change, Jenkins takes care of extensively checking the package, generating a very complete overview and updating our documentation site.

one of the sphinx extensions I enabled: coverage, for documentation coverage report, which is currently undocumented.

I execute sphinx in my buildbot-generated environment, and
I don't seem to manage to include the coverage statistics in the sphinx-generated documentation site!

any hints?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傻比既视感 2024-10-27 08:54:02

sphinx.ext.coverage页面所述,如果指定构建器,则计算覆盖率-b 覆盖率

结果是文件 "python.txt",一个 ReST 文件。您的任务是将其集成到您自己的文档中。

as stated on the sphinx.ext.coverage page, coverage is computed if one specifies the builder -b coverage.

the result is the file "python.txt", a ReST file. It is your task to integrate it in your own documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文