pynwb
pynwb copied to clipboard
Added test for to_hierarchical_dataframe for the icephys tables
This PR is in response to https://github.com/hdmf-dev/hdmf/issues/665 which identified an issue where conversion of the icephys metadata tables to a hierarchical dataframe fails if a table contains a VectorIndex column. This PR adds corresponding tests in PyNWB to make sure this case is tests here. A corresponding PR on HDMF will follow as well to fix this issue.
How to test the behavior?
From https://github.com/hdmf-dev/hdmf/issues/665
from pynwb.testing import create_icephys_testfile
from hdmf.common.hierarchicaltable import to_hierarchical_dataframe
nwbfile = create_icephys_testfile()
nwbfile.icephys_experimental_conditions.add_column('newcol', 'abc', data = [1,2,3], index = [2,3])
to_hierarchical_dataframe(nwbfile.icephys_experimental_conditions)
Checklist
- [x] Did you update CHANGELOG.md with your changes?
- [X] Have you checked our Contributing document?
- [X] Have you ensured the PR clearly describes the problem and the solution?
- [X] Is your contribution compliant with our coding style? This can be checked running
flake8
from the source directory. - [X] Have you checked to ensure that there aren't other open Pull Requests for the same change?
- [X] Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.