Skip to content

Add check for Units table without spike_times#691

Merged
h-mayorquin merged 5 commits intodevfrom
flag_empty_units_table
Mar 25, 2026
Merged

Add check for Units table without spike_times#691
h-mayorquin merged 5 commits intodevfrom
flag_empty_units_table

Conversation

@h-mayorquin
Copy link
Copy Markdown
Collaborator

The Units table in NWB exists to describe sorted neural units, and spike times are its core data. A Units table without a spike_times column is almost certainly an error or a misuse of the neurodata type (for example, storing cluster labels or quality metrics without the underlying spike data that gives them meaning).

This PR adds check_units_table_has_spikes at CRITICAL importance to flag this case.

@h-mayorquin h-mayorquin self-assigned this Mar 24, 2026
@bendichter bendichter self-requested a review March 25, 2026 13:04
@h-mayorquin h-mayorquin enabled auto-merge (squash) March 25, 2026 15:45
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.06%. Comparing base (60bfe7f) to head (8b769a7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #691      +/-   ##
==========================================
+ Coverage   79.87%   83.06%   +3.19%     
==========================================
  Files          48       48              
  Lines        1873     1878       +5     
==========================================
+ Hits         1496     1560      +64     
+ Misses        377      318      -59     
Files with missing lines Coverage Δ
src/nwbinspector/checks/__init__.py 100.00% <ø> (ø)
src/nwbinspector/checks/_ecephys.py 94.11% <100.00%> (+0.17%) ⬆️

... and 5 files with indirect coverage changes

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

@h-mayorquin h-mayorquin merged commit 061ee1e into dev Mar 25, 2026
25 of 26 checks passed
@h-mayorquin h-mayorquin deleted the flag_empty_units_table branch March 25, 2026 15:49
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.

3 participants