Add check_image_series_external_file_forward_slashes#717
Open
bendichter wants to merge 1 commit into
Open
Conversation
Flag backslashes in ImageSeries.external_file paths. These are produced by platform-dependent path joining on Windows and silently fail to resolve on POSIX systems and against archive asset keys such as those used by DANDI. Registered at BEST_PRACTICE_VIOLATION to parallel the sibling check_image_series_external_file_relative. Closes #697 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bendichter
commented
Jul 14, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #717 +/- ##
==========================================
+ Coverage 79.71% 83.12% +3.40%
==========================================
Files 48 48
Lines 1923 1932 +9
==========================================
+ Hits 1533 1606 +73
+ Misses 390 326 -64
🚀 New features to boost your workflow:
|
bendichter
marked this pull request as ready for review
July 15, 2026 18:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #697
Summary
Adds a check that flags backslashes in
ImageSeries.external_filepaths. These are produced by platform-dependent path joining on Windows (e.g.ses-1_image\abc123_external_file_0.mp4) and silently fail to resolve on POSIX systems and against archive asset keys, which always use forward slashes. This is what causedget_dandi_video_info()to return empty results for Dandiset 001771.The check decodes bytes paths like the neighboring checks do, and yields one message per offending entry so a series with several external files reports each bad one.
Severity
Registered at
BEST_PRACTICE_VIOLATION, paralleling the siblingcheck_image_series_external_file_relative. A path that is genuinely broken locally is already reported asCRITICALbycheck_image_series_external_file_valid. Happy to raise this toCRITICALif reviewers feel the silent failure on the archive warrants it.Changes
check_image_series_external_file_forward_slashesinsrc/nwbinspector/checks/_image_series.py, exported fromchecks/__init__.pydocs/best_practices/image_series.rstunder thebest_practice_image_series_external_file_forward_slashesanchor referenced by the docstringTesting
Five new unit tests cover the passing forward-slash path, a non-external series, the backslash trigger, a bytestring path, and multiple external files. All tests in
test_image_series.pypass;ruffandblackare clean. Also ran end-to-end throughinspect_nwbfileon a written NWB file containing one backslash and one forward-slashImageSeries— the check fires on the backslash one only.🤖 Generated with Claude Code