Docs build succeeds with broken examples: fix 7 failing runblock examples and fail the build on errors
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 39/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- documentation, testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 224
- Forks
- 31
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 29
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus petercorke/machinevision-toolbox-python
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
petercorke/machinevision-toolbox-python#160 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Image.draw_* fail on images from Image.Read: pixel data is not C-contiguous (cv2 line/circle/putText layout error)Evtl. vergeben @petercorke hat das heute übernommen. Offenbug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
petercorke/machinevision-toolbox-python#158 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 42/100
petercorke/machinevision-toolbox-python#157 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
petercorke/machinevision-toolbox-python#152 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ROSBag: RealSense bags have a 4-byte depth-units trailer that is guessed, not parsedEvtl. vergeben @theluckystrike hat das vor 4 Tagen übernommen. Offenbug help wanted
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
petercorke/machinevision-toolbox-python#151 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in petercorke/machinevision-toolbox-python
Ähnliche Issues
-
Uninstall guide omits the CloudWatch log groups AWS CodeBuild creates for useCodeBuild pipelinesOffenbug documentation
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
awslabs/visual-asset-management-system#552 ·
Maintainer antworten meist innerhalb von 1 Tag
-
netbox status: needs triage type: documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
netbox-community/netbox#23460 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
awslabs/threat-composer#362 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ansys/pyansys-common-mcp#213 ·
Maintainer antworten meist innerhalb von 3 Tagen