scipion.scripts.config module

Check the local configuration files, and/or create them if requested or if they do not exist.

scipion.scripts.config.addVariablesToSection(cf, section, vars, exclude=[])[source]

Add all the variables in vars to the config “cf” at the section passed it cleans the path to avoid long absolute repetitive paths


Return function that escapes text with ANSI color n.
scipion.scripts.config.checkConf(fpath, ftemplate, update=False, unattended=False, compare=False)[source]

Check that all the variables in the template are in the config file too :parameter fpath: path to the config file :parameter ftemplate, template file to compare. Only used for protocols and hosts :parameter update: flag, default to false. if true, values from the template will be written to the config file :parameter unattended: avoid questions, default to false. :parameter compare: make a comparison with the template

scipion.scripts.config.checkNotify(config, configfile, unattended)[source]

Check if protocol statistics should be collected.


Check that some paths in the config file actually make sense

scipion.scripts.config.compareConfig(cf, ct, fPath, fTemplate)[source]

Compare configuration against template values

scipion.scripts.config.compareConfigVariable(section, variableName, valueInConfig, valueInTemplate)[source]
scipion.scripts.config.createConf(fpath, ftemplate, unattended=False)[source]

Create config file in fpath following the template in ftemplate

scipion.scripts.config.getConfigPathFromConfigFile(scipionConfigFile, configFile)[source]

:param scipionConfigFile path to the config file to derive the folder name from :param configFile: name of the template: protocols or hosts so far :return theoretical path for the template at the same path as the config file

scipion.scripts.config.getConfigVariable(config, section, variableName)[source]

Guess the system’s Java installation, return a dict with the Java keys


Guess the system’s MPI installation, return a dict with MPI keys