Docs build succeeds with broken examples: fix 7 failing runblock examples and fail the build on errors
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 39/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- documentation, testing
调研方向
Start by running sphinx-build -b html docs/source docs/build/html and searching its output for RUNBLOCK-ERROR; the issue names examples in ImageBlobs.py, ImageCore.py, ImageIO.py, ImageFiducials.py, ImageTensor.Tensor, and source/tensor.rst. Read each listed example and its implementation, checking the available mvtbdata image and the documented PyTorch build setup. Done when the listed examples work or are non-executed where needed, and enabling pycon_fail_on_error makes the docs build fail on a runblock error.
由索引模型根据 Issue 内容生成。
描述
sphinx-pyrunblock executes the .. runblock:: pycon examples in docstrings and .rst pages at build time. When an example raises, it prints a !! [RUNBLOCK-ERROR] <file>:docstring of <object>:<line> block to the terminal, but that is not a Sphinx warning. The build still ends with build succeeded and exit code 0, so broken examples (with their tracebacks in the rendered output) ship unnoticed.
Found on origin/main at 77a3da9c (2026-10-17), both in CI's Docs Publish job (23 error lines) and in a local sphinx-build -b html docs/source docs/build/html in a clean venv (19 lines; Sphinx 9.1.0, sphinx-pyrunblock 1.2.0, OpenCV 5.0.0.93). To find them, grep the build output for RUNBLOCK-ERROR.
Examples to fix
-
Blobs.vc(ImageBlobs.py, example around line 822):blobs.vdoes not exist (AttributeError). Typo or stale attribute name. -
Image.A(ImageCore.py, around line 2140): the example doesimg.A = np.zeros((50,50)), butImageis now immutable and.Ais deprecated (since 2.0.0), so it raises. Rewrite to show creating a newImage. -
Image.array_as(ImageCore.py:2346-2347): callsimg.array_int(...), which no longer exists; usearray_as. -
Image.showwindow(ImageIO.py, around line 498): the signature isshowwindow(self, h, ax, **kwargs)but the example callsshowwindow(h=1)withoutax, then uses an undefinedwindow. Fix the example or the signature. -
Image.fiducial(ImageFiducials.py:115): readstags.png, which is not inmvtbdata;apriltag12.pngis. Use an image that exists (and make sure the dictionary name matches the tags in it). -
ImageTensor.Tensorandsource/tensor.rst(lines 30 and 47): PyTorch is not installed in the docs build (ModuleNotFoundError,ImportError: PyTorch is required). Either addtorch(CPU wheel) to thedocsextra, or turn these into non-executed code blocks. -
Image.draw_point(ImageCore.py:4169): fails on OpenCV 5.0; this is a library bug, tracked in #158, not an example error.
Most of the NameErrors in the logs (img, tensor, fiducials, window, W, rand) are fallout from one of the above failing earlier in the same block.
Stop it regressing
- Turn on sphinx-pyrunblock's
pycon_fail_on_error(added in 1.1.0) once the list above is clean, so a failing example fails the docs build. Until then, consider a CI step that greps the build log forRUNBLOCK-ERRORand prints the count.
This should be resolved before the next release; the Docs Publish job currently publishes these tracebacks.
Related: the 111 ordinary Sphinx warnings in the same build (9 "Block quote ends without a blank line", cross-reference ambiguities, duplicate object descriptions, the SMTB intersphinx 404) are a separate clean-up.
- 主要语言
- Python
- 星标
- 224
- 派生
- 35
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 29
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
petercorke/machinevision-toolbox-python 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 76/100
petercorke/machinevision-toolbox-python#160 ·
维护者通常 1 天内回复
-
Image.draw_* fail on images from Image.Read: pixel data is not C-contiguous (cv2 line/circle/putText layout error)可能已有人在做 @petercorke 于 1 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 35/100
petercorke/machinevision-toolbox-python#158 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 42/100
petercorke/machinevision-toolbox-python#157 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
petercorke/machinevision-toolbox-python#152 ·
维护者通常 1 天内回复
-
ROSBag: RealSense bags have a 4-byte depth-units trailer that is guessed, not parsed可能已有人在做 @theluckystrike 于 4 天前认领。 未关闭bug help wanted
难度 5/5 一周以上 新手友好度 25/100
petercorke/machinevision-toolbox-python#151 ·
维护者通常 1 天内回复
查看 petercorke/machinevision-toolbox-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
volcengine/OpenViking#6445 ·
维护者通常 1 天内回复
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be edited可能已有人在做 @ManyaJain111 今天认领。 未关闭bug enhancement possible-duplicate
难度 2/5 1-3 小时 新手友好度 77/100
AOSSIE-Org/PictoPy#1637 · 4 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
deepspeedai/DeepSpeed#8884 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
flagos-ai/FlagQuantum#718 ·
维护者通常 1 天内回复
-
bug CI-failure high priority
难度 1/5 1 小时以内 新手友好度 86/100
vllm-project/afd-plugin#483 ·
维护者通常 1 天内回复