palaeoware / trevosim

TREvoSim - The [Tr]ee [Evo]lutionary [Sim]ulator program
GNU General Public License v3.0
4 stars 3 forks source link

Cannot write log files to subdirectories #34

Closed ms609 closed 4 weeks ago

ms609 commented 2 months ago

I would like to write the output of a simulation to a subdirectory within TREvoSim_output. (Windows gets grumpy when there are too many files within a single directory – and it will make my output easier to navigate.)

If I specify a Basename of dir/file

image

I see an error at the end of the run:

image

Ideally TREvoSim would create the dir subdirectory. Failing that, it would be helpful to have some input validation so the user sees the error before beginning a run.

RussellGarwood commented 2 months ago

I had not considered this before - thanks for the suggestion. Can you clarify, though - I could make the software create dir for you, no worries, but then that would still result in - if you were e.g. doing a batch - a large number of files in that directory, just nested under one TREvoSim output folder. So would it be preferable to add an output option of e.g. "one folder per replicate" or something along those lines?

RussellGarwood commented 2 months ago

(sorry, I accidentally closed rather than commenting!)

ms609 commented 2 months ago

I can see two use cases here:

RussellGarwood commented 4 weeks ago

With the above commit this is now implemented - FYI you need to use forward slashes for paths (I note this, because on windows the native separator is a backslash). If you enter a path via the GUI with backslashes, the software replaces this with a forward slash, but if you are loading it programatically, you will need to ensure you use a forward slash otherwise the software will provide an error message. I'll add this to the documentation.