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

Adding OnePhotonSeries class #1593

Merged
merged 16 commits into from
Dec 21, 2022
Merged

Adding OnePhotonSeries class #1593

merged 16 commits into from
Dec 21, 2022

Conversation

CodyCBakerPhD
Copy link
Collaborator

Motivation

Adding the OnePhotonSeries class to PyNWB, which was recently added to the schema in NeurodataWithoutBorders/nwb-schema#523

@CodyCBakerPhD CodyCBakerPhD added the category: enhancement improvements of code or code behavior label Nov 10, 2022
@CodyCBakerPhD CodyCBakerPhD self-assigned this Nov 10, 2022
@CodyCBakerPhD CodyCBakerPhD marked this pull request as draft November 10, 2022 19:56
@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Merging #1593 (daa13f1) into dev (f4bd3bc) will increase coverage by 0.53%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #1593      +/-   ##
==========================================
+ Coverage   91.25%   91.78%   +0.53%     
==========================================
  Files          25       26       +1     
  Lines        2515     2557      +42     
  Branches      477      489      +12     
==========================================
+ Hits         2295     2347      +52     
+ Misses        139      134       -5     
+ Partials       81       76       -5     
Flag Coverage Δ
integration 71.17% <91.11%> (+0.95%) ⬆️
unit 83.92% <53.33%> (-0.57%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pynwb/file.py 88.08% <100.00%> (+0.08%) ⬆️
src/pynwb/io/file.py 97.07% <100.00%> (+2.73%) ⬆️
src/pynwb/io/utils.py 100.00% <100.00%> (ø)
src/pynwb/ophys.py 96.05% <100.00%> (+0.40%) ⬆️
src/pynwb/io/base.py 91.35% <0.00%> (+7.40%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@CodyCBakerPhD
Copy link
Collaborator Author

@rly Looks like when I updated the nwb-schema version, it triggered some failing container-type tests? Any ideas?

@CodyCBakerPhD CodyCBakerPhD marked this pull request as ready for review December 14, 2022 17:19
@CodyCBakerPhD
Copy link
Collaborator Author

@rly @oruebel @bendichter OK with #1540 in this now appears to be working, ready for review

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@oruebel oruebel left a comment

Choose a reason for hiding this comment

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

This looks in general good to me. Could you also add:

@CodyCBakerPhD
Copy link
Collaborator Author

CodyCBakerPhD commented Dec 14, 2022

@oruebel Adding the round-trip IO integration test indeed reveals an issue with one of the new fields - the relevant piece of the traceback is

 hdmf.build.errors.ConstructError: ..... 

Could not construct OnePhotonSeries object due to: OnePhotonSeries.__init__: incorrect type for 'binning' (
    got 'uint64', expected 'int'
)

any suggestions for how to fix this?

@CodyCBakerPhD
Copy link
Collaborator Author

In particular, the schema specification for this field is actually as uint8: https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/core/nwb.ophys.yaml#L21

src/pynwb/ophys.py Outdated Show resolved Hide resolved
oruebel
oruebel previously approved these changes Dec 14, 2022
@oruebel
Copy link
Contributor

oruebel commented Dec 14, 2022

WooHoo 100% test coverage on the diff. Thanks @CodyCBakerPhD for adding support for OnePhotonSeries!

@rly since this PR updates the schema, does this need to be merged with the dev branch or a different release branch?

@rly
Copy link
Contributor

rly commented Dec 15, 2022

This should go to a new branch for schema 2.6 support. So that we try to stick with the release schedule, NWB 2.6 will be released around Jan. 5 and the corresponding PyNWB and MatNWB releases should be made around Jan. 8.

@rly
Copy link
Contributor

rly commented Dec 15, 2022

I'll create that new branch and redirect this PR there.

@rly rly changed the base branch from dev to schema_2.6.0 December 15, 2022 22:57
@rly
Copy link
Contributor

rly commented Dec 15, 2022

This is now good to merge @CodyCBakerPhD

@rly rly merged commit 27902b7 into schema_2.6.0 Dec 21, 2022
@rly rly deleted the add_one_photon_series branch December 21, 2022 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants