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

set_data_io method and associated test #934

Merged
merged 5 commits into from
Aug 15, 2023
Merged

set_data_io method and associated test #934

merged 5 commits into from
Aug 15, 2023

Conversation

bendichter
Copy link
Contributor

Motivation

A potential replacement for NeurodataWithoutBorders/pynwb#1752

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?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff 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 "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.

@bendichter bendichter requested a review from rly August 7, 2023 23:22
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (92915c2) 88.39% compared to head (dc2d8f5) 88.40%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #934   +/-   ##
=======================================
  Coverage   88.39%   88.40%           
=======================================
  Files          45       45           
  Lines        9350     9355    +5     
  Branches     2662     2663    +1     
=======================================
+ Hits         8265     8270    +5     
  Misses        766      766           
  Partials      319      319           
Files Changed Coverage Δ
src/hdmf/container.py 91.65% <100.00%> (+0.04%) ⬆️

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

@rly
Copy link
Contributor

rly commented Aug 15, 2023

I think this is fine. The only minor concern is that this will not raise an error or do anything if a user calls set_data_io on a non-scalar attribute. But that is rare and has no bad side effect. There is no straightforward way to detect at the container level whether a field is a dataset or an attribute. I think this is good then. Please add a changelog. Thanks!

@bendichter
Copy link
Contributor Author

@rly I just noticed there is a (now defuct) method on Data called set_dataio (no second underscore). Do you think it would be better to rename this to be consistent?

@bendichter bendichter changed the title draft of set_data_io method and associated test set_data_io method and associated test Aug 15, 2023
@rly
Copy link
Contributor

rly commented Aug 15, 2023

I kind of prefer set_data_io because the underscores separate words. wrap_data_io might be better, but either is fine.

@bendichter bendichter merged commit d346736 into dev Aug 15, 2023
25 of 26 checks passed
@rly rly deleted the set_data_io branch October 3, 2023 16:53
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