general thoughts on modularization and code refactoring #2066
-
Hi @glopesdev continuing our prematurely-ended, elevator conversation here. Bonsai works well for me for many things, just wanted to say basically my experience, having heavily used bonsai for many variants of experiments, is that I've found trouble with the following:
Possibly both issues are already resolved but I lack the proper knowledge :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am going to assume that by "inputs" here you mean About
The editor provides reasonable support for 1. but the error messages may be confusing because of #1059. As for 2. it is actually possible to force/specify the type of the input to the group. Take any workflow node providing the input type you are interested in and from the right-click context menu select "Create Source > WorkflowInput". This will create a As for 3. the order of inputs is determined by the label indicated in the
Regarding what outputs a node sends, there is always only exactly one output sequence, and its type is determined strictly by the set of operations specified in the workflow itself. Here I don't think we are so different from languages like Python where functions can actually return anything they want at runtime. At least in the case of Bonsai we know immediately and ahead of time what the output type is because type-inference is performed on the workflow (simply right-click any node). But maybe what you mean here is a question of group workflow documentation, which is another topic which may be worth discussing how to make easier.
Here I am assuming that by "variables" you mean About
It is true the search function currently does not differentiate between subscribe and multicast nodes (this could change soon). However, in terms of finding the original declaration the editor does support it. Simply right-click any subject in the toolbox or in the workflow and from the right-click context menu select "Go to definition" (or press F12).
Yes, simply click on any subject (subscribe / multicast / declaration) and press F2 or right-click the subject and choose "Rename". This will rename all uses of that subject and correctly take into account the aforementioned scoping rules. However, bear in mind that subjects used inside include workflows will not be renamed since the include is read-only. There were some early discussions about whether to support this if the include workflow explicitly externalized a property with the subject name, but this has not been implemented yet. Thanks for the feedback, these are all important questions we are considering in our path towards making it easier to deal with larger workflows. |
Beta Was this translation helpful? Give feedback.
I am going to assume that by "inputs" here you mean
WorkflowInput
nodes.About
WorkflowInput
nodes there are usually three things one would like to know to understand how to call a group node:The editor provides reasonable support for 1. but the error messages may be confusing because of #1059.
As for 2. it is actuall…