Repository navigation
Keep HTML validation reports available when link checks fail - #304
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
==========================================
+ Coverage 89.82% 90.66% +0.83%
==========================================
Files 15 21 +6
Lines 1632 2131 +499
==========================================
+ Hits 1466 1932 +466
- Misses 166 199 +33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Merged current The existing local validation for this integrated result recorded 84 affected tests passing on Python 3.12/pydicom 3.0.2, including HTML rendering and validation-mode restoration, plus passing pinned pre-commit hooks and a warnings-as-errors documentation build. Those results are reused here; no unchanged local checks were rerun for this upload. Fresh hosted CI has started on the updated branch and is pending. |
Describe the changes
Optional HEAD probes for links to the DICOM standard can abort HTML error reporting on network or HTTP failures, and successful or failed probes do not close their connections.
Use contextlib.closing around the HTTPSConnection lifetime, and treat HTTPException/OSError plus the existing ValueError/TypeError failures as an unavailable optional link. Keep the response status boundary at <400 and retain existing parent-section fallback.
Existing HTML rendering tests now use a deterministic optional-link fixture with a fresh reference cache; the RT Series parent-section link assertion is preserved.
No matching open issue was found; this is a directly reproduced bug fix.
Validation
Tested on Linux with Python 3.12.14 and pydicom 3.0.2.
580cca5fon Linux, macOS and Windows.Compatibility
The handler is explicitly example code. Default socket timeouts, parent-reference retries, positive-reference caching, and HTTPS behavior remain as upstream. A nonresponsive server can still delay reporting; this patch handles errors and resource cleanup, not a new timeout policy.
Tasks
Focused regressions, formatting and documentation checks are reused from the reviewed Linux preparation at the unchanged base. The HTML rendering checks above were completed separately on macOS; the hosted platform-matrix result is recorded above.