Run Controlers (regolith.runcontrol)

Run Control object for regolith

regolith.runcontrol.NotSpecified = NotSpecified

A helper class singleton for run control meaning that a ‘real’ value has not been given.

class regolith.runcontrol.NotSpecifiedType[source]

A helper class singleton for run control meaning that a ‘real’ value has not been given.

class regolith.runcontrol.RunControl(_updaters=None, _validators=None, **kwargs)[source]

A composable configuration class. Unlike argparse.Namespace, this keeps the object dictionary (__dict__) separate from the run control attributes dictionary (_dict).

regolith.runcontrol.connect_db(rc, colls=None)[source]

Load up the db’s

Parameters:
  • rc – The runcontrol instance

  • colls – The list of collections that should be loaded

Returns:

  • chained_db – The chained databases in the form of a document

  • dbs – The databases in the form of a runcontrol client

regolith.runcontrol.ensuredirs(f)[source]

For a file path, ensure that its directory path exists.

regolith.runcontrol.exec_file(filename, glb=None, loc=None)[source]

A function equivalent to the Python 2.x execfile statement.

regolith.runcontrol.filter_databases(rc)[source]

Filters the databases list down to only the ones we need, in place.

regolith.runcontrol.flatten(iterable)[source]

Generator which returns flattened version of nested sequences.

regolith.runcontrol.ishashable(x)[source]

Tests if a value is hashable.

regolith.runcontrol.load_json_rcfile(fname)[source]

Loads a JSON run control file.

regolith.runcontrol.load_rcfile(fname)[source]

Loads a run control file.

regolith.runcontrol.touch(filename)[source]

Opens a file and updates the mtime, like the posix command of the same name.

regolith.runcontrol.warn_forbidden_name(forname, inname=None, rename=None)[source]

Warns the user that a forbidden name has been found.