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

Add trials metadata #999

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Add trials metadata #999

wants to merge 6 commits into from

Conversation

bendichter
Copy link
Contributor

fix #997

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 78.37838% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.37%. Comparing base (b7ae085) to head (4576bc4).

Files Patch % Lines
...conv/datainterfaces/text/timeintervalsinterface.py 75.00% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 91.37% <78.37%> (-0.08%) ⬇️

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

Files Coverage Δ
src/neuroconv/datainterfaces/__init__.py 100.00% <100.00%> (ø)
...tainterfaces/text/csv/csvtimeintervalsinterface.py 100.00% <100.00%> (ø)
...terfaces/text/excel/exceltimeintervalsinterface.py 100.00% <100.00%> (ø)
...conv/datainterfaces/text/timeintervalsinterface.py 86.66% <75.00%> (-6.67%) ⬇️

Copy link
Collaborator

@h-mayorquin h-mayorquin left a 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"),
Copy link
Collaborator

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": [
Copy link
Collaborator

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"),
Copy link
Collaborator

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.

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.

[Feature]: add trials to metadata
2 participants