hdmf icon indicating copy to clipboard operation
hdmf copied to clipboard

Don't override col_cls in DynamicTable.add_column

Open rly opened this issue 1 year ago • 2 comments

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.md with 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?

rly avatar Apr 04 '24 10:04 rly

Will this be in by next milestone?

mavaylon1 avatar Apr 25 '24 15:04 mavaylon1

Please let us know when it gets in. We are relying on it for implementation of ndx-hed.

VisLab avatar Apr 26 '24 15:04 VisLab

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.

codecov[bot] avatar Jan 18 '25 07:01 codecov[bot]