-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add trials metadata #999
base: main
Are you sure you want to change the base?
Add trials metadata #999
Conversation
for more information, see https://pre-commit.ci
…0. I think they should be allowed to be 0-length
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #999 +/- ##
==========================================
- Coverage 91.44% 91.37% -0.08%
==========================================
Files 127 127
Lines 7525 7556 +31
==========================================
+ Hits 6881 6904 +23
- Misses 644 652 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why break the pattern of the other interfaces and functions where the data and metadata are in separate streams? Here we send them both through the columns. How are you thinking about it?
TimeIntervals=dict( | ||
trials=dict( | ||
columns=dict( | ||
start_time=dict(description="start time of the trial"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this overwritten by the schema by default? the description of start_time and stop_time?
"type": "string" | ||
} | ||
}, | ||
"required": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't description be required as well?]
from pynwb.testing.mock.file import mock_NWBFile
nwbfile = mock_NWBFile()
nwbfile.add_trial_column(name='correct')
Throws an error.
columns=dict( | ||
start_time=dict(description="start time of the trial"), | ||
stop_time=dict(description="stop time of the trial"), | ||
correct=dict(description="correct or not"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting that you had to pass the name inside the dictionary as well from reading the schema, but here, the name here is only passed as the dictionary key.
fix #997