Classes
Version: 2.0.5 class list
Class: Node (object)
Description
Abstract base class for serializeable entities.
Subclasses should specify the attributes to be serialized in a class attribute called ATTRS. This is a dict, keyed by attribute name, with values specifying the attribute type and additional validation constraints.
The type is specified as a string, with the following options:
- bool -A boolean
- str - A string
- int - An integer
- dict - A dictionary
- Cmd - A Cmd object
- list:str - A list of strings
- list:int - A list of integers
- list:dict - A list of dictionaries
- list:Cmd - A list of Cmd objects
Validations depend on the type. For strings, the validator is a regular expression. For ints, the min and max values are specified.
The node metaclass generates a setter/getter for each attribute. This keeps the class definition easy to read and maintain.
Class: DagNode (Node)
Description
Abstract base class nodes that can appear in the DAG graph.
This class maintains unique naming for each instance and provides functionality to manage DAG-specific properties and relationships such as parents, children, and instance tracking.
The step and order properties of the coords attribute are used as hints for laying out nodes in a visual graph. They represent semantic coordinates. The Cytoscape layout plugin storm-layout uses these attributes to position nodes in a graph so that they bear some relation to the intent of the original author. They are not required, and any graph layout tools should provide a fallback, such as Klay or Dagre, if these attributes are not present.
See the README for more information.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
Class: Job (DagNode)
Description
The single node that represents the entire submission job.
Conceptually, a job is what the other nodes in the graph are working towards.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
re.compile('^[_a-z0-9 ,.!?\\\'"]+$', re.IGNORECASE)A comment about the job that can appear in the job index.
n.comment(value) -> self n.comment() -> str
re.compile('^[a-z0-9_\\-\\.\\s]+$', re.IGNORECASE)The Conductor project with which this job is associated.
n.project(value) -> self n.project() -> str
re.compile('^[a-z\\s]+$', re.IGNORECASE)The user who submitted the job. This should be controlled by client tools in order to ensure the user is who they say they are.
n.author(value) -> self n.author() -> str
re.compile('^(?:[a-z][a-z0-9]*$|([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$|^$)', re.IGNORECASE)The location tag allows the uploader and downloader daemons to limit themselves to specific jobs with matching locations.
n.location(value) -> self n.location() -> str
re.compile('^\\d{1,2}\\.\\d{1,2}.\\d{1,2}$')The clientside schema version.
n.schema_version(value) -> self n.schema_version() -> str
Class: WorkNode (DagNode)
Description
Abstract base class nodes that do some work.
Work nodes. Tasks, and integrations are work nodes. The job node is not a work node.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
Class: Task (WorkNode)
Description
Tasks are generic nodes that contain commands.
They may be added to other Tasks as dependencies or to the Job.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
---The commands to run on the instance.
n.commands(Cmd(*args), Cmd(*args), ...) -> self n.push_commands(Cmd(*args), Cmd(*args), ...) -> self n.commands() -> list of Cmd
re.compile('^[a-z0-9_\\-\\.\\s]+$', re.IGNORECASE)The instance type definition to run the task on.
n.hardware(value) -> self n.hardware() -> str
---Whether the task can be preempted by the cloud provider.
n.preemptible(value) -> self n.preemptible() -> bool
---Environment variables to set on the instance.
n.env({key: 'VAL', ...}) -> self n.update_env({key2: 'VAL2', ...}) -> self n.env() -> dict
{'keys': ['minsec', 'maxsec']}The minimum and maximum number of seconds the task is expected to run. If it runs shorter or longer, then the task is considered to have failed.
n.lifecycle({key: 'VAL', ...}) -> self n.update_lifecycle({key2: 'VAL2', ...}) -> self n.lifecycle() -> dict
{'min': 1, 'max': 10}The number of times to attempt to run the task if it is preempted or failed.
n.attempts(value) -> self n.attempts() -> int
---The directory in which to store the output of the task. In most cases this will be set automatically by the system.
n.output_path(value) -> self n.output_path() -> str
re.compile('^[a-fA-F0-9]{32}$')The set of packages Ids that describe the software to be made available and billed for this task.
n.packages(*args) -> self n.push_packages(*args) -> self n.packages() -> list of str
Class: Upload (WorkNode)
Description
Upload node.
Uploads contain lists of filepaths. They are a special kind of task and can be added anywhere Task can be added.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
{'keys': ['path', 'size', 'md5']}The files to upload. Each file must have a path, size, and md5 hash.
n.files({key: 'VAL', ...}, {key: 'VAL', ...}, ...) -> self n.push_files({key: 'VAL', ...}, {key: 'VAL', ...}, ...) -> self n.files() -> list of dict
Class: Cmd (Node)
Description
A Cmd represents a single command line to be executed.
Tasks hold a list of Cmds, and Cmd arguments are held in a list. Lists of commands in a task run in serial.
Properties
---n.argv(*args) -> self n.push_argv(*args) -> self n.argv() -> list of str
Class: Email (WorkNode)
Description
An Email node sends a notification to a list of addresses.
Properties
re.compile('^(holding|open|running|canceled|succeeded|failed|incomplete|completed)$')Whether the node should start when all it's inputs are complete, or be held and wait for manual approval to unhold.
n.status(value) -> self n.status() -> str
---Arbitrary metadata that can be used for filtering and so on.
n.metadata({key: 'VAL', ...}) -> self n.update_metadata({key2: 'VAL2', ...}) -> self n.metadata() -> dict
{'keys': ['step', 'order']}A hint for the graph layout algorithm to place the node in a specific position.
n.coords({key: 'VAL', ...}) -> self n.update_coords({key2: 'VAL2', ...}) -> self n.coords() -> dict
re.compile('(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)')The email addresses to send the message to.
n.addresses(*args) -> self n.push_addresses(*args) -> self n.addresses() -> list of str
re.compile('^[^\\r\\n]{1,255}$', re.IGNORECASE)The subject of the email.
n.subject(value) -> self n.subject() -> str
re.compile('^[\\s\\S]*$', re.IGNORECASE)The body of the email.
n.body(value) -> self n.body() -> str