Deterministically cover the scan-time DependencyError branch - #852
Conversation
The warn-and-continue branch for DependencyError in the scan loop was only exercised by the legacy DASVader file, and only on HDF5 stacks that cannot dereference it; a stack update flipped that and left dev at 99.98% project coverage, hard-failing codecov for every open PR. Cover it with a name-gated formatter like the missing-optional one.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesThe test suite now simulates Dependency error scan handling
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #852 +/- ##
===========================================
+ Coverage 99.98% 100.00% +0.01%
===========================================
Files 164 164
Lines 18192 18192
===========================================
+ Hits 18190 18192 +2
+ Misses 2 0 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
dev's codecov/project check is failing at 99.98% (target 100%), which hard-fails every open PR (it already showed up on #846 and #851). The two uncovered lines are the
except DependencyErrorwarn-and-continue branch in the scan loop (dascore/io/core.py:1393-1394).That branch was only exercised indirectly by
test_legacy_file_scan_warns_and_skips, which scans the legacy DASVader JLD2 file — and whether that raisesDependencyErrordepends on the installed HDF5 stack. An upstream dependency update (first visible on the #845 merge CI run) made the legacy file scan cleanly, so the branch silently lost coverage.This adds a deterministic test using a name-gated
_DependencyErrorFormatter, mirroring the existing_MissingOptionalFormatterpattern, so the branch stays covered regardless of the HDF5 stack. Test-only change.Changelog
none
Checklist
I have (if applicable):
Summary by CodeRabbit
Bug Fixes
Tests