pyworkflow.gui.project.viewprotocols module¶
- pyworkflow.gui.project.viewprotocols.INIT_REFRESH_SECONDS = 5¶
View with the protocols inside the main project window.
- class pyworkflow.gui.project.viewprotocols.ProtocolConfig(text=None, value=None, **args)[source]¶
Bases:
pyworkflow.project.config.MenuConfig
Store protocols configuration
- class pyworkflow.gui.project.viewprotocols.ProtocolTreeConfig[source]¶
Bases:
object
Handler class that groups functions and constants related to the protocols tree configuration.
- ALL_PROTOCOLS = 'All'¶
- PLUGIN_CONFIG_PROTOCOLS = 'protocols.conf'¶
- TAG_PROTOCOL = 'protocol'¶
- TAG_PROTOCOL_BETA = 'protocol_beta'¶
- TAG_PROTOCOL_DISABLED = 'protocol-disabled'¶
- TAG_PROTOCOL_GROUP = 'protocol_group'¶
- TAG_PROTOCOL_NEW = 'protocol_new'¶
- TAG_SECTION = 'section'¶
- class pyworkflow.gui.project.viewprotocols.ProtocolTreeProvider(protocol)[source]¶
Bases:
pyworkflow.gui.tree.ObjectTreeProvider
Create the tree elements for a Protocol run
- class pyworkflow.gui.project.viewprotocols.ProtocolsView(parent, windows, **args)[source]¶
Bases:
tkinter.Frame
What you see when the “Protocols” tab is selected.
In the main project window there are three tabs: “Protocols | Data | Hosts”. This extended tk.Frame is what will appear when Protocols is on.
- RUNS_CANVAS_NAME = 'runs_canvas'¶
- createContent()[source]¶
Create the Protocols View for the Project. It has two panes:
Left: containing the Protocol classes tree Right: containing the Runs list
- executeProtocol(prot)[source]¶
Function to execute a protocol called not directly from the Form “Execute” button.
- getCurrentProtocolView()[source]¶
Select the view that is currently selected. Read from the settings the last selected view and get the information from the self._protocolViews dict.
- refreshDisplayedRuns(e=None, initRefreshCounter=True, checkPids=False)[source]¶
Refresh the status of displayed runs. Params:
e: Tk event input initRefreshCounter: if True the refresh counter will be set to 3 secs
then only case when False is from _automaticRefreshRuns where the refresh time is doubled each time to avoid refreshing too often.
- class pyworkflow.gui.project.viewprotocols.RunBox(nodeInfo, canvas, text, x, y, bgColor, textColor)[source]¶
Bases:
pyworkflow.gui.canvas.TextBox
Just override TextBox move method to keep track of position changes in the graph.
- class pyworkflow.gui.project.viewprotocols.RunIOTreeProvider(parent, protocol, mapper)[source]¶
Bases:
pyworkflow.gui.tree.TreeProvider
Create the tree elements from a Protocol Run input/output childs
- static getColumns()[source]¶
Return a list of tuples (c, w) where: c: is the column name and index w: is the column width
- getObjectActions(obj)[source]¶
Return a list of tuples (key, action) were keys are the string options that will be display in the context menu and the actions are the functions to call when the specific action is selected. The first action in the list will be taken as the default one when the element is double-clicked.
- getObjectInfo(obj)[source]¶
This function will be called by the Tree with each object that will be inserted. A dictionary should be returned with the possible following entries: ‘key’: the key value to insert in the Tree ‘text’: text of the object to be displayed
(if not passed the ‘key’ will be used)
‘image’: image path to be displayed as icon (optional) ‘parent’: the object’s parent in which insert this object (optional) ‘tags’: list of tags names (optional)
- static getObjectLabel(obj, parent)[source]¶
We will try to show in the list the string representation that is more readable for the user to pick the desired object.
- class pyworkflow.gui.project.viewprotocols.RunsTreeProvider(project, actionFunc)[source]¶
Bases:
pyworkflow.gui.tree.ProjectRunsTreeProvider
Provide runs info to populate tree
- getObjectActions(obj)[source]¶
Return a list of tuples (key, action) were keys are the string options that will be display in the context menu and the actions are the functions to call when the specific action is selected. The first action in the list will be taken as the default one when the element is double-clicked.
- class pyworkflow.gui.project.viewprotocols.SearchProtocolWindow(parentWindow, **kwargs)[source]¶
Bases:
pyworkflow.gui.gui.Window
- class pyworkflow.gui.project.viewprotocols.StepsTreeProvider(stepsList)[source]¶
Bases:
pyworkflow.gui.tree.TreeProvider
Create the tree elements for a Protocol run
- static getObjectInfo(obj)[source]¶
This function will be called by the Tree with each object that will be inserted. A dictionary should be returned with the possible following entries: ‘key’: the key value to insert in the Tree ‘text’: text of the object to be displayed
(if not passed the ‘key’ will be used)
‘image’: image path to be displayed as icon (optional) ‘parent’: the object’s parent in which insert this object (optional) ‘tags’: list of tags names (optional)
- class pyworkflow.gui.project.viewprotocols.StepsWindow(title, parentWindow, protocol, **args)[source]¶
- pyworkflow.gui.project.viewprotocols.inspectObj(obj, filename, prefix='', maxDeep=5, inspectDetail=2, memoryDict=None)[source]¶
Creates a .CSV file in the filename path with all its members and recursively with a certain maxDeep, if maxDeep=0 means no maxDeep (until all members are inspected).
- inspectDetail can be:
1: All attributes are shown
2: All attributes are shown and iterable values are also inspected
- prefix and memoryDict will be updated in the recursive entries:
prefix is a compound of the two first columns (DEEP and Tree)
memoryDict is a dictionary with the memory address and an identifier