pyworkflow.template module

Module to host templates classes

class pyworkflow.template.LocalTemplate(source, tempPath)[source]

Bases: Template

Local template representing a json file in the file system

static getDescription(strList)[source]
class pyworkflow.template.Template(source, name, description='')[source]

Bases: object

createTemplateFile()[source]
genProjectName()[source]
getContent()[source]

Returns the content of the template if not present it calls , loadContent

getObjId()[source]
getParams()[source]
loadContent()[source]

Method to load into self.content the content of a template

parseContent()[source]
replaceEnvVariables()[source]
setParamValue(alias, newValue)[source]
class pyworkflow.template.TemplateList(templates=None)[source]

Bases: object

addLocalTemplates(tempId=None)[source]
addPluginTemplates(tempId=None)[source]

Get the templates provided by all plugins. :return: a list of templates

addScipionTemplates(tempId=None)[source]

Adds scipion templates from local file system or from workflow hub. :param tempId: identifier of the template to look up for. If fount only this template is chosen

addTemplate(t)[source]
addWHTemplates(tempId=None)[source]
genFromStrList(templateList)[source]
sortListByPluginName()[source]
class pyworkflow.template.TemplateParam(index, title, value=None, varType=None, alias=None)[source]

Bases: object

getAlias()[source]
getIndex()[source]
getTitle()[source]
getType()[source]
getValue()[source]
setValue(value)[source]
validate()[source]
class pyworkflow.template.Validations[source]

Bases: object

FIELDS VALIDATION

classmethod check(value, fieldType)[source]
static validBoolean(value)[source]
static validDecimal(value)[source]
static validInteger(value)[source]
static validPath(value)[source]
static validString(value)[source]