pypest / pyemu

python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
BSD 3-Clause "New" or "Revised" License
168 stars 94 forks source link

use robocopy mirror instead of shutil.copytree in start_workers() #474

Closed RyanConway91 closed 6 months ago

RyanConway91 commented 6 months ago

Not a bug, just an idea....

For windows machines, it would be cool to add an option to use robocopy with mirror (\MIR) instead of shutil.copytree() to start_workers. You would obviously need to set cleanup = False so the worker dirs stick around...

With the mirror argument, robocopy "mirrors" the parent to child directory and only modifies files that are different. Much faster than deleting the whole dir and using shutil.copytree, especially if you are making small changes in a PEST run and not launching a whole new setup.

jtwhite79 commented 6 months ago

It can be expensive to recopy all the files for every run...but Ive been burned by not starting fresh sooo many times. Im not opposed to a robocopy option tho...PRs welcome :)