Add DynamicTable non-generated base class#838
Open
ehennestad wants to merge 10 commits into
Open
Conversation
Remove size validation for columnVector
Improved docstrings
5 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## codex/aligned-dynamic-table-add-category #838 +/- ##
===========================================================================
Coverage ? 95.38%
===========================================================================
Files ? 220
Lines ? 7894
Branches ? 0
===========================================================================
Hits ? 7530
Misses ? 364
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Remove test validating a deprecating error that is removed in this PR
Remove test verifying a deprecating error that is removed in this PR
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.
Motivation
DynamicTable methods (
addRow,addColumn,getRow,toTable,clear) were previously injected into generated class files as thin delegators to utility functions in+types/+util/+dynamictable/. Because the generator writes methods as multiline strings, adding docstrings orargumentsblocks there is impractical — so none existed.The consequence was poor discoverability: no in-editor help text, no autocomplete hints for name-value arguments, and no input validation at the method boundary. Users had to trace through to the underlying utility functions to understand how to call the methods.
This PR introduces
matnwb.neurodata.DynamicTableBase, a handwritten abstract base class thatDynamicTableand its subclasses inherit from. The delegation to utility functions is unchanged — the only additions are docstrings andargumentsblocks on each method, making them self-documenting and IDE-friendly.The
toTablemethod also renames the positional argument fromindextokeepRegionsIndexedfor clarity.How to test the behavior?
Checklist
fix #XXwhereXXis the issue number?