Closed omus closed 2 years ago
~The work around to this problem is to pre-create the samples subdir prior to calling store_edf_as_onda
~
Update: I am wrong about this, the mkpath
call will just continue to fail...
if you're using S3 it might also be good to not use the high-level convenience functions (meant more for scripts/interactive work) but instead use the more primitive API functions in composition with the save/load functions you want, e.g.
https://beacon-biosignals.github.io/OndaEDF.jl/stable/#OndaEDF.edf_to_onda_samples
IIRC i leaned toward getting rid of store_edf_as_onda
because was afraid people would want to keep adding features to it instead of more simply composing with other functions 😁
if you're using S3 it might also be good to not use the high-level convenience functions
Overall I agree with the sentiment of using lower-level functions and making use of composition. As I'm trying to quickly iterate through this work I'll make the fix for this here and look into refactoring my code as a follow up.
When passing in an
S3Path
as theonda_dir
intostore_edf_as_onda
an error will occur if thesamples
subdirectory does not exist:In this example
p"s3://bucket/prefix/file.edf/"
was passed in. The creation of the subdirectory is handled bystore_edf_as_onda
and we should add `* '/`` when creating the samples dir to have this code work generically.