Fix external-file ImageSeries test and require pynwb>=4.0 - #708
Merged
Conversation
PyNWB 4.0.0 raises a ValueError when an ImageSeries with format='external' uses rate for timing and has empty data, unless num_samples is set, because the frame count can no longer be inferred from the data length. Pass num_samples=1 so test_check_image_series_external_file_valid_bytestring_pass constructs successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
NWB Inspector tracks the latest PyNWB only (#510). The latest release is 4.0.0, so raise the minimum to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rly
enabled auto-merge (squash)
June 30, 2026 19:36
bendichter
approved these changes
Jun 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #708 +/- ##
==========================================
+ Coverage 79.44% 82.81% +3.37%
==========================================
Files 48 48
Lines 1897 1897
==========================================
+ Hits 1507 1571 +64
+ Misses 390 326 -64 🚀 New features to boost your workflow:
|
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.
Follow-up to #707.
Problem
After PyNWB 4.0.0 was released, the daily and dev CI workflows started failing on
tests/unit_tests/test_image_series.py::TestExternalFileValid::test_check_image_series_external_file_valid_bytestring_pass:PyNWB 4.0.0 added validation that an
ImageSerieswithformat='external'andratetiming must setnum_samples, since the frame count cannot be inferred from the (empty) data length. The test constructs exactly such anImageSerieswithoutnum_samples, so it now raises at construction time.#707 ran against PyNWB 3.1.3 (PyNWB 4.0.0 had not yet been released), so it did not surface this. The scheduled runs picked up 4.0.0 once it was published.
Changes
num_samples=1when constructing theImageSeriesin that test, satisfying the PyNWB 4.0.0 validation.>=4.0inpyproject.toml. NWB Inspector targets the latest PyNWB only (see Support only latest PyNWB #510), and the latest release is now 4.0.0, so the floor is bumped to match.Scope
The test is the only place in the suite combining
format="external"withratetiming and empty data. Other external-file constructions usetimestamps, which derive the frame count and do not trip the new check.Note: the
test-dandi-dev/test-dandi-dev-livejobs fail with the sameValueErrorraised from DANDI's own test fixtures (dandi/tests/fixtures.py), which is an upstream DANDI incompatibility with PyNWB 4.0 and is not addressed here.🤖 Generated with Claude Code