Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance selection of rows in DynamicTable #191

Merged
merged 13 commits into from
Nov 18, 2019
Merged

Enhance selection of rows in DynamicTable #191

merged 13 commits into from
Nov 18, 2019

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Nov 6, 2019

Motivation

The goal is to enhance selection of rows from a DynamicTable. This PR makes the following changes:

  • Add support for selecting rows in a DynamicTable via slice and add corresponding tests
  • Return Pandas DataFrame when selecting full rows from a DynamicTable and add/update unit tests accordingly
  • Use OrderedDict when converting to Pandas to ensure consistent ordering on columns

The matching PR that updates the tests in PyNWB is NeurodataWithoutBorders/pynwb#1106

Checklist

  • Have you checked our Contributing document?
  • Have you ensured the PR description clearly describes problem and the solution?
  • Is your contribution compliant with our coding style ? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using #XXX notation where XXX is the issue number ? By including "Fix #XXX" you allow GitHub to close the corresponding issue.

@codecov
Copy link

codecov bot commented Nov 6, 2019

Codecov Report

Merging #191 into dev will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #191      +/-   ##
==========================================
- Coverage   70.27%   70.26%   -0.01%     
==========================================
  Files          30       30              
  Lines        5920     5946      +26     
  Branches     1385     1394       +9     
==========================================
+ Hits         4160     4178      +18     
- Misses       1326     1330       +4     
- Partials      434      438       +4
Impacted Files Coverage Δ
src/hdmf/common/table.py 55.66% <66.66%> (+0.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cc14f9...81e2d87. Read the comment docs.

@oruebel oruebel changed the title Enhance selection of rows in DynamicTable [WIP] Enhance selection of rows in DynamicTable Nov 6, 2019
bendichter
bendichter previously approved these changes Nov 8, 2019
Copy link
Contributor

@bendichter bendichter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@rly
Copy link
Contributor

rly commented Nov 8, 2019

Looks good to me too

@oruebel
Copy link
Contributor Author

oruebel commented Nov 8, 2019

Thanks @rly @bendichter for reviewing. Now I just need to get a matching PR going for PyNWB to make sure it works with these changes ;-)

@oruebel oruebel marked this pull request as ready for review November 8, 2019 22:34
@oruebel oruebel changed the title [WIP] Enhance selection of rows in DynamicTable Enhance selection of rows in DynamicTable Nov 8, 2019
@oruebel
Copy link
Contributor Author

oruebel commented Nov 14, 2019

@rly can you review this PR again. In addition to the previous changes I had to add the DynamicTableRegion.shape property to make shape validation work with the new behavior (which is being used in PyNWB). Could you also review the matching PR in PyNWB NeurodataWithoutBorders/pynwb#1106 and help me with the merge/release of these PRs. I need these PRs in order to be able to merge oruebel/ndx-icephys-meta#13

@oruebel oruebel merged commit 9f9edf8 into dev Nov 18, 2019
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.

3 participants