pyworkflow.project.config module

class pyworkflow.project.config.Label(labelId=None, name='', color=None)[source]

Bases: pyworkflow.object.Scalar

Store Label information

get()[source]

Get the value, if internal value is None the default argument passed is returned.

getColor()[source]
getId()[source]
getName()[source]
getObjValue()[source]

Return the internal value for storage. This is a good place to do some update of the internal value before been stored

setColor(color)[source]
setName(newName)[source]
class pyworkflow.project.config.LabelsList[source]

Bases: pyworkflow.object.List

Store all labels information

addLabel(label)[source]
clear()[source]

Remove all items from list.

deleteLabel(label)[source]
getLabel(name)[source]
updateDict()[source]
class pyworkflow.project.config.MenuConfig(text=None, value=None, icon=None, tag=None, **kwargs)[source]

Bases: object

Menu configuration in a tree fashion. Each menu can contains submenus. Leaf elements can contain actions

addSubMenu(text, value=None, **args)[source]
isEmpty()[source]
class pyworkflow.project.config.NodeConfig(nodeId=0, x=None, y=None, selected=False, expanded=True)[source]

Bases: pyworkflow.object.Scalar

Store Graph node information such as x, y.

get()[source]

Get the value, if internal value is None the default argument passed is returned.

getId()[source]
getLabels()[source]
getObjValue()[source]

Return the internal value for storage. This is a good place to do some update of the internal value before been stored

getPosition()[source]
getX()[source]
getY()[source]
isExpanded()[source]
isSelected()[source]
setExpanded(expanded)[source]
setLabels(labels)[source]
setPosition(x, y)[source]
setSelected(selected)[source]
setX(x)[source]
setY(y)[source]
class pyworkflow.project.config.NodeConfigList[source]

Bases: pyworkflow.object.List

Store all nodes information items and also store a dictionary for quick access to nodes query.

addNode(nodeId, **kwargs)[source]
clear()[source]

Remove all items from list.

getNode(nodeId)[source]
updateDict()[source]
class pyworkflow.project.config.ProjectConfig(**args)[source]

Bases: pyworkflow.object.OrderedObject

A simple base class to store ordered parameters

class pyworkflow.project.config.ProjectSettings(confs={}, **kwargs)[source]

Bases: pyworkflow.object.OrderedObject

Store settings related to a project.

COLOR_MODES = (0, 1, 2)
COLOR_MODE_AGE = 2
COLOR_MODE_LABELS = 1
COLOR_MODE_STATUS = 0
addNode(nodeId, **kwargs)[source]
ageColorMode()[source]
commit()[source]

Commit changes made.

getColorMode()[source]
getConfig()[source]
getCreationTime()[source]
getLabels()[source]
getLifeTime()[source]
getNodeById(nodeId)[source]
getNodes()[source]
getProtocolView()[source]
getReadOnly()[source]
getRunsView()[source]
labelsColorMode()[source]
classmethod load(dbPath)[source]

Load a ProjectSettings from dbPath.

setColorMode(colorMode)[source]

Set the color mode to use when drawing the graph.

setCreationTime(value)[source]
setLifeTime(value)[source]
setProtocolView(protocolView)[source]

Set the new protocol Menu given its index. The new ProtocolMenu will be returned.

setReadOnly(value)[source]
setRunsView(value)[source]
statusColorMode()[source]
write(dbPath=None)[source]
class pyworkflow.project.config.ProtocolConfig(text=None, value=None, **args)[source]

Bases: pyworkflow.project.config.MenuConfig

Store protocols configuration

addSubMenu(text, value=None, shortCut=None, **args)[source]
class pyworkflow.project.config.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_DISABLED = 'protocol-disabled'
TAG_PROTOCOL_GROUP = 'protocol_group'
TAG_SECTION = 'section'
classmethod getProtocolTag(isInstalled)[source]

Return the proper tag depending if the protocol is installed or not.

classmethod isAFinalProtocol(v, k)[source]
classmethod load(domain, protocolsConf)[source]

Read the protocol configuration from a .conf file similar to the one in scipion/config/protocols.conf, which is the default one when no file is passed.