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

Fix scalar dataset with compound dtype for export #1185

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

stephprince
Copy link
Contributor

@stephprince stephprince commented Sep 4, 2024

Motivation

This is a follow up to #1176.

The pynwb roundtrip export tests for ElectrodeGroupIO were failing for the scalar compound dataset because on export
options[‘dtype’] was a <class 'numpy.dtype[void]'> and not a list:

# Write a compound dataset, i.e, a dataset with compound data type
elif isinstance(options['dtype'], list):

Converting the dtype to a list like the non-scalar compound datatypes fixes this and also allows me to revert some changes I had made in the previous PR to the validator.

How to test the behavior?

Show how to reproduce the new behavior (can be a bug fix or a new feature)

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Does the PR clearly describe the problem and the solution?
  • Have you reviewed our Contributing Guide?
  • Does the PR use "Fix #XXX" notation to tell GitHub to close the relevant issue numbered XXX when the PR is merged?

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (b5235a7) to head (357e28d).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1185   +/-   ##
=======================================
  Coverage   89.02%   89.03%           
=======================================
  Files          45       45           
  Lines        9879     9883    +4     
  Branches     2812     2813    +1     
=======================================
+ Hits         8795     8799    +4     
  Misses        767      767           
  Partials      317      317           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stephprince stephprince marked this pull request as ready for review September 4, 2024 17:05
@stephprince stephprince requested a review from rly September 4, 2024 17:05
rly
rly previously approved these changes Oct 2, 2024
@stephprince
Copy link
Contributor Author

If I understand correctly the failing tests are addressed in #1194, I can wait for that PR to be merged to merge this one.

@stephprince stephprince enabled auto-merge (squash) October 2, 2024 21:40
@stephprince stephprince merged commit b78625b into dev Oct 2, 2024
28 checks passed
@stephprince stephprince deleted the fix-scalar-cmpd-dset-export branch October 2, 2024 21:45
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.

2 participants