gaps.legacy.Pipeline#

class Pipeline(pipeline, monitor=True, verbose=False)[source]#

Bases: Pipeline

Legacy reV-like pipeline execution framework.

When subclassing this object, you MUST set the following properties in the __init__ method:

monitorbool

Flag to perform continuous monitoring of the pipeline.

verbosebool

Flag to submit pipeline steps with “-v” flag for debug logging.

_configobject

reV-style config object. The config object MUST have the following attributes:

namestr

Job name (typically defaults to the output directory name).

diroutstr

Output file directory (typically the same directory that contains the config file).

hardwarestr

Name of hardware that the pipeline is being run on (typically “eagle”).

_run_listlist

List of dictionaries, each with a single key-value pair, where the key represents the command and the value represents the command config filepath to substitute into the CMD_BASE string.

You must also call self._init_status() in the initializer. If you want logging outputs during the submit step, make sure to init the “gaps” logger.

Parameters:
  • pipeline (str | dict) – Pipeline config file path or dictionary.

  • monitor (bool, optional) – Flag to perform continuous monitoring of the pipeline. By default, True.

  • verbose (bool, optional) – Flag to submit pipeline steps with “-v” flag for debug logging. By default, False.

Methods

cancel_all(pipeline)

Cancel all jobs corresponding to pipeline.

run(pipeline[, monitor, verbose])

Run the reV-style pipeline.

Attributes

CMD_BASE

Formattable string of the base pipeline CLI command.

COMMANDS

List of pipeline command names (as str).

name

Name of the pipeline job (directory of status file).

status

A gaps pipeline status object.

abstract property CMD_BASE#

Formattable string of the base pipeline CLI command.

Type:

str

abstract property COMMANDS#

List of pipeline command names (as str).

Type:

list

classmethod run(pipeline, monitor=True, verbose=False)[source]#

Run the reV-style pipeline.

Parameters:
  • pipeline (str | dict) – Pipeline config file path or dictionary.

  • monitor (bool, optional) – Flag to perform continuous monitoring of the pipeline. By default, True.

  • verbose (bool, optional) – Flag to submit pipeline steps with “-v” flag for debug logging. By default, False.

classmethod cancel_all(pipeline)[source]#

Cancel all jobs corresponding to pipeline.

Parameters:

pipeline (path-like) – Pipeline config file path.

property name#

Name of the pipeline job (directory of status file).

Type:

str

property status#

A gaps pipeline status object.

Type:

Status