-
Notifications
You must be signed in to change notification settings - Fork 5
Config Builder in the future !
Each step in the pipeline_config always has an input role, and one or more output roles. At present, there also exists a concept of role priority; as such we cannot display the current pipeline config as a graph (in the mathematical sense). In order to be able to plot the pipeline config as a graph, we need to remove the idea of role_priority. This will have consequences for the rest of the code, which will be addressed below.
At present, only the step_controller and selection_page_presenter are considered as parent presenters in the pipeline_config. This can be made more generic, encapsulating all presenters in a page presenter. The role of the page controller is simple: it encapsulates other presenters/controllers required for a page, and displays them accordingly.
Each page controller will contain:
- ONE Role changing controller (eg selection page, connected, rack scan) - NECESSARY
- Any number of non-role changing controllers (eg kit) - OPTIONAL
A "role changing" controller is a presenter which is in charge of changing the role of the input labware from "input role" to "output role".
A "non-role changing" controller is a presenter/controller which has no impact on the roles. For instance, the kit_presenter is necessary to achieve a task, but by itself does not change the roles.
If there is no role changing controller within our page, then the process ceases to advance; therefore, we need a 'role-changer'. For instance, out of our existing presenters, the page presenter could have one of either the selection_page_presenter, connected_presenter or rack_scan_presenter as its role changing presenter.
At present, we could re-use the step_controller as a page_presenter. The step presenter could be changed, such that it no longer has buttons, or anything to display of its own. Instead, it just takes us from one presenter to another: from one step to the next. This means that each presenter has to tell the page-presenter when it can move to the next presenter (ie when that presenter is 'done').
This would be useful in making the display more compact. One of our main issues is the display taking up too much space on the screen; the user has to scroll to see everything. Instead, we could hide, or fold up (jQueryUI accordion for example), the controllers on the page when they are done, so that the user is guided through the process. Another option would be to have a column on the left of the page with an overview of the processes; the user sees the currently selected process.
The Config Builder -> this would be a tool which allows a developer to create a pipeline-component file graphically, from which we can build our pipeline_config. The pipeline-config with components file (from here referred to as the plc_config file) is created by the config builder, and contains all the information the config builder needs to display a fully formed graph, with components included. This is NOT the same thing as the pipeline_config (from here referred to as the pl_config) file which is used in our code.
As discussed above, the idea of role-priority will need to be removed. This will make the pl_config more complex, but this additional complexity will be handled by the Config Builder, since pl_config is generated by the config builder.
The below estimates include time to for manual testing, and automated testing where appropriate. These are changes to the existing code, so it is crucial that when these changes are made, we don't break the existing code!
At this stage we already have a skeleton graph running, using a force layout in d3. It is running as a separate app, is accessible on local_server_url/graph.html. This can be found on this branch.
Task | Description | Estimated Time |
---|---|---|
Change the structure of our existing code |
|
14hr |
Create config_templates as json files, one for every controller. | See the config templates section in this document for more information. | 3hr |
Setup code to support a graph html page | Create a new graph_app file and html page for the config_builder. | Time: 0hr: this has already been done. |
Task | Description | Estimated Time |
---|---|---|
Fixed "fake root" node | A fake controller (a node in the graph) where all the entry roles come from. This will need to deal with the all the possible input roles (currently 6; Manual and Automated extraction each have 3: DNA and RNA, DNA only, RNA only) when a new graph is created, all that should be displayed is this fixed root node as a starting point. User should not be able to delete the root node. | 2hr |
Context menu -> each controller should have a context menu which displays when it is clicked on. This context menu could be displayed in a separated div next to the graph. The context menu should contain: |
|
15hr |
Add a node, representing a page controller ->The user should be presented with the option to add a node when another node is clicked -> the new node will be linked by default to the new node. The process is as follows: |
|
15hr |
Toolbox -> Note that the below estimates do not factor in the functionality, rather just the creation of the toolbox in the view. contains options to: |
|
2hr |
A way of creating a component -> detailed information can be found in the section about components in this document. |
|
13hr |
A way of placing a created component in to the graph. A component should be reusable -> can appear multiple times on a graph | when inserted, user could be presented with a list of current output roles that aren't in use as inputs: component can be placed here. Alternatively, the user could add the component from the context menu for a node. Either way, component won't make sense without an input role! Possibility of multiple input/ output links. One input for every output. Output role is computed by component, based on input role. | 6hr |
make it obvious to the user where there are end of process pages/ nodes | These correspond to nodes without an output role, e.g. the wate tube controller. | 2hr |
view of the sub graph of component | You should be able to view any existing component, and be able to edit it in the same manner as creating a component. | 3hr |
Task | Description | Estimated Time |
---|---|---|
Save graph in a plc_config file that contains all the information needed to display the above mentioned graph |
|
5hr |
Load a previous graph from a *plc_config* file |
|
6hr |
Use a previous plc_config file to generate a *pl_config* file. | Using the saved information about components and controller configuration, we should be able to generate a full pipeline_config. This is the main purpose of this app! | 4hr |
In total, these estimates sum to 90 hours. This is optimistic, since these issues will only become clearer once work begins. It would be sensible to round it ~120 hours, to include contingency.
When a controller is set-up, it needs a set of configuration parameters. The configuration parameters that are required vary from one presenter to the next. Since we don't have a generic configuration structure that we can use for all presenters, we need something to specify what each presenter needs. We can create a "config template" file for each presenter, so that we have a clear definition of how each presenter gets configured.
Each config template will define the following for a controller:
- what properties it can have
- which are required
- which are optional
These templates can be defined as in the below example:
{
"title": "required",
"input": {
"role": "required"
}
"output": [{
"role": "required",
"batched": "not-required",
"tracked": "not-required"
}]
}
Note: Input and output always have the same list of required and optional properties.
The config_builder module would be a graphical tool for building pipeline_config. Each node will represent a page controller, and each link between nodes represents both the output role of the source node, and the input role of the target node. (one edge === one role)
The way that roles have been defined in the pipeline_config allows us to break down parts of the overall process into components. It should be noted however that this is purely a display feature only within the config_builder! The concept of a component should not need to be represented in the pipeline config in any way, other than in the role names.
For example, in the pipeline config we can see:
->qD.input_tube_dnap.to_be_retubed.batched -> qD.input_tube_dnap -> qD.input_tube_dnap.batched<-
Here, the prefix of qD.input_tube_dnap persists in the role-name. This part of the process could be displayed as a component, in order to simplify the presentation of the pipeline_config.
In some parts of the process, the rolenames are modified with different suffixes. Again it must be noted that this idea only appears in how the roles are defined. If their definition changes, then we have no concept of components in the pipeline_config.
Below is a basic illustration of how we can pull out a component in a general case.
We could factorise the intermediate states into a component, such that we get a role, * , going in, and a different role, *' , coming out.
We can also have a component that is re-used in order to display a section of the process that is performed in the same way. Again, an example is shown below.
According to these rolenames, both a and b undergo the same process. As such, we should be able to have both of the processes using the same component.
A component should be able to be viewed in greater detail - clicking on a component will display a sub-graph of all the page_controllers making up that component. If a component is edited within its subgraph, all places in which the component is used will have the same changes.
A step in the pipeline_config could be as simple as outlined below. Each step, is representative of a single instance of the page_controller in the workflow.
{
input: {…},
output: [{…}, …],
controllers: [
{
controller:presenter1,
config:config1
},
{
controller:presenter2,
config:config2
},
{
controller:presenter3,
config:config3
},
]
}
Each controller needs to be specified by name, so that the presenter_factory can construct it. It also needs configuration parameters specific to the presenter type, as discussed in this section.