Flexible subject reading - #73
Open
alessandrofelder wants to merge 2 commits into
Open
Conversation
ageorgou
requested changes
Sep 7, 2020
ageorgou
left a comment
Contributor
There was a problem hiding this comment.
The header method looks good, but I don't see where it's called or where self.subject is set.
| return trial_times | ||
|
|
||
| def get_subject_info(self): | ||
| return "\n".join( |
Contributor
There was a problem hiding this comment.
I wonder whether ". ".join(... is better (to have everything in a single line. It could get quite long if we have a lot of information though.
Comment on lines
+224
to
+227
| # If both metadata and header have a non-empty subject entry, the header gets priority. | ||
| # If neither have an entry, pynwb defaults to not writing a subject field in the file. | ||
| if self.subject: | ||
| self.add_subject(self.subject) |
Contributor
There was a problem hiding this comment.
Are we sure that this way prioritises the header over the metadata? If they both have subject information, does the second call to add_subject not do anything, or does it fail (or overwrite it with the second argument)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This includes all non-empty information from the
[BIOLOGY INFORMATION]section provided in headers of non-legacy LabView versions under theSubjectgroup in the NWB file. If any of these header fields are non-empty, they will be written as a row inSubject, and any subject-related entries in the metadata will be ignored as a consequence.Addresses one of the remaining points in #23 .