Conversation
darrencl
left a comment
There was a problem hiding this comment.
Thanks a lot for submitting this PR! This is definitely useful and I am happy to know that someone actually use this tool! 😄
I am guilty for not checking this sooner as I have not been actively using Julia myself recently – I apologise for that.
Overall, this looks good to me, but I just have 1 question & possible change request in the comment.
| get_metadata_path(path), dicttype=OrderedDict{String,Any} | ||
| ) | ||
| events = !load_events ? DataFrame() : CSV.read( | ||
| get_events_path(path), |
There was a problem hiding this comment.
If I understand correctly, get_events_path(path) could return nothing if for some reason the corresponding _events.tsv doesn't exist.
If that's the case, the CSV.read(nothing) will raise MethodError: no method matching joinpath(::Nothing), which could be unhelpful for user.
I suggest raising a more useful error in get_events_path(path) that indicates joinpath(this_dirname, fname_without_ext * "_events.tsv") couldn't be found.
This PR does two key things:
eventsfield to theFiletype to support loading_events.tsvfiles as DataFramesDocs and tests have also been added where relevant, and helper functions like
sessionsto access fields without using.syntax.Non-whitespace changes