payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 25 forks source link

Add option to overwrite existing directories #255

Closed aidanheerdegen closed 4 years ago

aidanheerdegen commented 4 years ago

Users would like to be able to payu run with an existing work directory and for payu to run as usual, removing the work directory automatically.

There are some issues with implementing this interactively (#250) so a half way solution is to provide a command line argument to remove any existing work directory. The option -f/--force is probably appropriate, unless this is to broad and might want to be used in some other context?

If there is an option to overwrite an existing work directory should there also be an option to overwrite an existing outputXXX directory?

If yes then should they be separate options? Say -w for overwrite work and -o for overwrite outputXXX?

aidanheerdegen commented 4 years ago

What say you @marshallward?

marshallward commented 4 years ago

Overwriting an output feels a bit dangerous to me, but it sounds like there may be some demand for it?

But I think some sort of 'forced' run could be useful. It's a deliberate action so users know what they're getting into.

aidanheerdegen commented 4 years ago

Any feels on the specific option? -f/--force ok with you?

marshallward commented 4 years ago

Yep I like it!

On Tue, 5 May 2020, 19:50 Aidan Heerdegen, notifications@github.com wrote:

Any feels on the specific option? -f/--force ok with you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/payu-org/payu/issues/255#issuecomment-624364696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQ322SIIX6DKSAIGZPNOTRQCQ2XANCNFSM4MZ7SZ5Q .

aidanheerdegen commented 4 years ago

There is a bug in the PR, I forgot to save that force argument in an environment variable so payu run isn't respecting it. Will fix.

aidanheerdegen commented 4 years ago

Forgot to add documentation!