change from using fparse to using parse #654
Merged
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.
Over the last week or so I worked with the new dev of the
parse
library to incorporate the datetime parsing into that library: r1chardj0n3s/parse#165. This was the only feature that motivated the splinter offparse
, so we can now move our dependence back toparse
with version >=1.20.0 and archivefparse
.There is one small difference in the
parse
implementation, which is that it infers whether the parsed value should be adatetime
, adate
, or atime
. If no time information is present,parse
returns adate
object. NeuroConv expects adatetime
, and I think PyNWB requires adatetime
for thesession_start_time
, so for backwards compatibility and for better compatibility with PyNWB, I included a line that transformsdate
s todatetime
s when extracting metadata.I'd really like NWB to accept just a date value there, since the actual time is often missing and must be filled in with incorrect data. If NeurodataWithoutBorders/nwb-schema#542 ever gets merged we can switch this back to returning dates when only date information is given. However I don't want that issue to hold up this one so I'd like to move forward with datetimes for now.