Skip to content

Fix empty timestamp bug#652

Merged
bendichter merged 3 commits intodevfrom
fix-empty-timestamp-bug
Feb 4, 2026
Merged

Fix empty timestamp bug#652
bendichter merged 3 commits intodevfrom
fix-empty-timestamp-bug

Conversation

@bendichter
Copy link
Copy Markdown
Contributor

Motivation

fix #582

Add guard for empty timestamps array in
check_timestamp_of_the_first_sample_is_not_negative to prevent
IndexError. The check now returns None (skips) when both starting_time
is None and timestamps is empty or None.
@bendichter bendichter marked this pull request as ready for review December 24, 2025 14:56
Copy link
Copy Markdown
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. But, should we have another check that catches empty data sets like this? maybe we already do and I just don't know.

@bendichter
Copy link
Copy Markdown
Contributor Author

yes, I think we should. I just wanted to first fix the error.

@bendichter bendichter enabled auto-merge (squash) February 4, 2026 17:39
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.36%. Comparing base (db8205e) to head (18fa320).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #652      +/-   ##
==========================================
+ Coverage   77.41%   80.36%   +2.94%     
==========================================
  Files          47       47              
  Lines        1656     1660       +4     
==========================================
+ Hits         1282     1334      +52     
+ Misses        374      326      -48     
Files with missing lines Coverage Δ
src/nwbinspector/checks/_time_series.py 91.83% <100.00%> (+0.34%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bendichter bendichter merged commit 04a3c2d into dev Feb 4, 2026
25 of 26 checks passed
@bendichter bendichter deleted the fix-empty-timestamp-bug branch February 4, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: errors with patchseq data

3 participants