intbio-ncl / BiomationScripterLib

A Python library to assist with scripting bio-automation protocols
MIT License
3 stars 0 forks source link

EchoProto.Write_Picklists function can be improved with more save options #10

Closed davidcmarkham closed 2 years ago

davidcmarkham commented 3 years ago

EchoProto.Write_Picklists function can be improved to include default save location i.e. the current working directory

The function will also raise an error if the save location provided does not exist. If this occurs, it should either be caught in the script or the directory should be created if it does not exist.

For example: BMS.EchoProto.Write_Picklists(Protocol, "./Picklists")

If .\Picklists does not exist, the directory could be created and then the picklists saved into that location.

There could also be a default to save in a new directory called "Picklists"

Brad0440 commented 2 years ago

The Write_Picklists function now has a default save location of the current directory: https://github.com/intbio-ncl/BiomationScripterLib/commit/61960da30a76ab56a60530d99b7b476025510364

I think it's probably best to not have a directory that doesn't exist be created within the code, as a lot of time this error is due to typos etc.

We could also add an argument so the user can define whether or not to create directories that don't exist. If this would be useful, feel free to open a new issue requesting the feature.