pyworkflow.gui.project.viewprotocols module

pyworkflow.gui.project.viewprotocols.INIT_REFRESH_SECONDS = 3

View with the protocols inside the main project window.

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'
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.

getSelectedProtocol()[source]
keyPressed(event)[source]
refreshRuns(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.
switchRunsView()[source]
toggleDataSelection(prot, append)[source]
updateProtocolsTree(protCfg)[source]
updateRunsGraph(refresh=False, reorganize=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: pyworkflow.gui.canvas.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)

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]
getObjectActions(obj)[source]
getObjectInfo(obj)[source]
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.

static getObjectPreview(obj)[source]
getObjects()[source]
class pyworkflow.gui.project.viewprotocols.RunsTreeProvider(project, actionFunc)[source]

Bases: pyworkflow.gui.tree.ProjectRunsTreeProvider

Provide runs info to populate tree

getActionsFromSelection()[source]

Return the list of options available for selection.

getObjectActions(obj)[source]
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]
static getObjectPreview(obj)[source]
getObjects()[source]
class pyworkflow.gui.project.viewprotocols.StepsWindow(title, parentWindow, protocol, **args)[source]

Bases: pyworkflow.gui.browser.BrowserWindow

pyworkflow.gui.project.viewprotocols.inspectObj(obj, filename, prefix='', maxDeep=5, inspectDetail=2, memoryDict={})[source]

Creates a .CSV file in the filename path with all its members and recursibely with a certain maxDeep, if maxDeep=0 means no maxDeep (untils 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 recursibe entries:
  • prefix is to compond the two first columns (DEEP and Tree)
  • memoryDict is a dictionary with the memory adress and an identifier
pyworkflow.gui.project.viewprotocols.populateTree(self, tree, treeItems, prefix, obj, subclassedDict, level=0)[source]