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.ProtocolsView(parent, window, **args)[source]

Bases: 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.

Construct a frame widget with the parent MASTER.

Valid resource names: background, bd, bg, borderwidth, class, colormap, container, cursor, height, highlightbackground, highlightcolor, highlightthickness, relief, takefocus, visual, width.

RUNS_CANVAS_NAME = 'runs_canvas'
SIZE_COLORS = {1048576: 'green', 1073741824: 'orange', 1099511627776: 'red'}
cleanInfo()[source]
createActionToolbar()[source]

Prepare the buttons that will be available for protocol actions.

createContent()[source]

Create the Protocols View for the Project. It has two panes:

Left: containing the Protocol classes tree Right: containing the Runs list

createRunItem(canvas, node)[source]
createRunsGraph(parent)[source]
createRunsTree(parent)[source]
drawRunsGraph(reorganize=False)[source]
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.

getProtocolViews()[source]
getSelectedProtocol()[source]
hasParentHidden(node)[source]
info(message)[source]

Return information about the packing options for this widget.

populateTree(tree, treeItems, prefix, obj, level=0)[source]
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.

refreshRuns(e=None, initRefreshCounter=True, checkPids=False)[source]

Refresh the protocol runs workflow. If the variable REFRESH_WITH_THREADS exits, then use a threads to refresh, i.o.c use normal behavior

setVisibleNodes(node, visible=True)[source]
switchRunsView()[source]
toggleDataSelection(prot, append)[source]
updateProtocolsTree(protCfg)[source]
updateRunsGraph(refresh=False, checkPids=False)[source]
updateRunsTree(refresh=False)[source]
updateRunsTreeSelection()[source]
class pyworkflow.gui.project.viewprotocols.RunBox(nodeInfo, canvas, text, x, y, bgColor, textColor)[source]

Bases: TextBox

Just override TextBox move method to keep track of position changes in the graph.

move(dx, dy)[source]
moveTo(x, y)[source]

Move TextBox to a new position (x,y)