Don't override col_cls in DynamicTable.add_column
Motivation
Issue: If a user extends DynamicTableRegion or EnumData and tries to create a column with that subclass, using the table or enum keyword args, their subclass argument gets replaced with the base DynamicTableRegion or EnumData classes.
Solution: Use the passed col_cls. If not provided, then use the base DynamicTableRegion or EnumData classes.
TODO: Add a quick test
Checklist
- [x] Did you update
CHANGELOG.mdwith your changes? - [x] Does the PR clearly describe the problem and the solution?
- [x] Have you reviewed our Contributing Guide?
- [x] Does the PR use "Fix #XXX" notation to tell GitHub to close the relevant issue numbered XXX when the PR is merged?
Will this be in by next milestone?
Please let us know when it gets in. We are relying on it for implementation of ndx-hed.
Codecov Report
Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
Project coverage is 90.87%. Comparing base (
775fa3b) to head (a5b6671). Report is 12 commits behind head on dev.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/hdmf/common/table.py | 92.30% | 0 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## dev #1091 +/- ##
==========================================
- Coverage 90.88% 90.87% -0.01%
==========================================
Files 42 42
Lines 9532 9537 +5
Branches 1922 1926 +4
==========================================
+ Hits 8663 8667 +4
Misses 576 576
- Partials 293 294 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.