Skip to content

Handle empty columns in dictionary check - #720

Open
AtomicGlance wants to merge 1 commit into
NeurodataWithoutBorders:devfrom
AtomicGlance:fix-empty-table-dict-check
Open

Handle empty columns in dictionary check#720
AtomicGlance wants to merge 1 commit into
NeurodataWithoutBorders:devfrom
AtomicGlance:fix-empty-table-dict-check

Conversation

@AtomicGlance

@AtomicGlance AtomicGlance commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Skip empty table columns before inspecting their first value in check_table_values_for_dict.
  • Add a regression test covering an empty DynamicTable column.

Why

DynamicTable and EventsTable can define columns before any rows are added. The check previously indexed column.data[0] unconditionally, causing an IndexError during inspection instead of returning no finding.

Fixes #712.

Validation

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1, PYTHONPATH=src: 377 passed, 30 skipped
  • ruff check src/nwbinspector/checks/_tables.py tests/unit_tests/test_tables.py: passed
  • Black was not available in the local environment.

@AtomicGlance
AtomicGlance marked this pull request as ready for review August 8, 2026 23:37
@AtomicGlance

Copy link
Copy Markdown
Author

The empty-column dictionary check is covered by a regression test, and the available CI checks are green. The PR is ready for review.

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.

check_table_values_for_dict failiing for empty table

1 participant