cbrain icon indicating copy to clipboard operation
cbrain copied to clipboard

utility module make folders #1343

Open MontrealSergiy opened this issue 1 year ago • 7 comments

see #1343 for details

MontrealSergiy avatar Sep 08 '23 19:09 MontrealSergiy

The code to make the directories should not be performed in a method that is meant to return a descriptor to the framework. It should be done in "setup", that's the proper place where everything related to preparing a work directory is supposed to happen.

prioux avatar Sep 08 '23 20:09 prioux

Actually I double checked, the on-disk invoke struct is created during 'cluster_commands()' so that's the method you need to override instead of setup().

prioux avatar Sep 11 '23 21:09 prioux

So do I keep old version (with minor improvements in variable names and plus of course), or should I avoid altering the command line and created subfolders directly instead?

MontrealSergiy avatar Sep 11 '23 21:09 MontrealSergiy

Don't modify the command line. Just writ the ruby code that run the mkdir. That's it.

prioux avatar Sep 11 '23 21:09 prioux

ok. Another possibility is to factor out invocation struct massaging into separate method, so setup can be used

MontrealSergiy avatar Sep 11 '23 21:09 MontrealSergiy

Done.

(adjusted to create subfolders asap)

MontrealSergiy avatar Sep 14 '23 18:09 MontrealSergiy

As agreed in person with Pierre, the method cluster_commands() is modified (but in a more complex way than at the first attempt)

MontrealSergiy avatar Oct 19 '23 19:10 MontrealSergiy