Open manuelma opened 2 years ago
One should be able to link a tool item with a console instance. However, I don't know how this would play with parallel scenario runs.
What I did for now is I added one line edit to the tool properties to enter what I called the 'group id'. If you want multiple tools to use the same console, you need to write the exact same group id string for all of them. Note that if you do this for tools that can run in parallel, it may happen that both run concurrently on the same console (and that can be very bad).
Filters (aka parallel scenario runs) are an exception.
Would it be possible to somehow guard against dangerous group ids at least on Toolbox level? On that note, could that text field be also be a 'search field' for existing ids? Edit: i.e. some kind of autofill would be appreciated
I like those suggestions a lot @soininen, and they should be easy to implement. Will give it a try.
(To check for dangerous group id we just need to check if there are parallel tools using the same group id - and to check for parallel tools, we just need to check if there's a directed path betwen them which is straitghforward with networkx)
At the moment each tool runs in isolation in the sense it uses its own console. Tools don't share consoles. The reason is, basically, that tools need to define variables and we don't want anything overwritten.
However, there are cases where it would be useful for tools to share consoles, for example, when a workflow has several tools that run different instances of SpineOpt. If all of them run in isolation, they need to compile SpineOpt individually and that takes time. If we could set all these tools to use the same console, SpineOpt needs to be compiled only once.