bmtk icon indicating copy to clipboard operation
bmtk copied to clipboard

Don't delete all contents of output_dir...

Open pgleeson opened this issue 6 years ago • 0 comments

Currently BMTK will delete all files & subfolders in the output_dir as specified of a Sonata file:

 "output":{ 
    "output_dir": "$OUTPUT_DIR",
   ...
  }

including presumably the user's home directory if they specify that...

https://github.com/AllenInstitute/bmtk/blob/develop/bmtk/simulator/core/io_tools.py#L73

It would be better to only delete the files BMTK expects to generate (as is suggested by the spec: "An optional attribute named "overwrite_output_dir" provides a hint to simulators to let them know if already existing output files must be overwritten."), or better still warn the user that that dir contains files BMTK didn't create.

pgleeson avatar Aug 12 '19 11:08 pgleeson