woom.tasks.Task

woom.tasks.Task#

class woom.tasks.Task(taskconfig, host)[source]#
__init__(taskconfig, host)[source]#

Initialize a task

Parameters:
  • taskconfig (configobj.Section) – Task configuration section

  • host (Host) – Host instance

Attributes

artifacts

The artifacts specifications as a dict (dict)

commandline

Commandline as an bash lines

config

The task configuration as loaded from the tasks.cfg (ConfigObj)

context

Context to be used for rendering

env

Instance of woom.env.EnvConfig specific to this task (EnvConfig)

host

The current Host instance (Host)

is_blocking

It is blocking?

is_skipped

Is this task statically skipped (set via skip = True in tasks.cfg)?

name

The task name (str)

run_dir

Run directory

Methods

export()

Export the task specification with rendering

export_scheduler_options()

Export a dict of scheduler options

fill_templates([dry])

Fill static user template files

get_artifact_path(name)

Get the path of a single artifact from its name

get_artifacts()

Get the artifacts raw paths as a dict

has_context()

Is the context already set for this task

render_artifacts()

Check that artifact paths are absolute and render them as dict

render_content()

Render the task content with jinja

set_context(context)

Set the context to be used for jinja rendering