pyyaks.task

Module to support executing a single task (processing step) in the pyaxx pipeline.

Classes

class pyyaks.task.DependMissing

Bases: exceptions.Exception

class pyyaks.task.DependFuncFailure

Bases: exceptions.Exception

class pyyaks.task.TaskSkip

Bases: exceptions.Exception

class pyyaks.task.TaskFailure

Bases: exceptions.Exception

class pyyaks.task.TaskDecor

Bases: object

Base class for generating task decorators.

class pyyaks.task.chdir(newdir)

Bases: pyyaks.task.TaskDecor

Run task within a specified directory.

Parameters:newdir – directory
class pyyaks.task.setenv(env)

Bases: pyyaks.task.TaskDecor

Run task within specfied runtime environment.

Parameters:env – dict of environment values
class pyyaks.task.depends(depends=None, targets=None)

Bases: pyyaks.task.TaskDecor

Check that dependencies are met: - depends files or values exist - targets files or values exist and are all newer than every depends.

Parameters:
  • depends – sequence of context values that must exist on task entrance.
  • targets – sequence of context values that must exist on task exit and be newer than all depends (if supplied).

Functions

pyyaks.task.task(run=None)

Function decorator to support definition of a processing task.

The run parameter value controls whether the task is run.

  • function: if run is a callable function then call the function

    with the task name as its argument and use the return value for the following rules.

  • True: Always run even if a previous task has already failed

  • False: Never run

  • None: Run if no previous pipeline tasks have failed (default).

Parameters:run – control running of task
Returns:Decorated function
pyyaks.task.start(*args, **kwargs)

Start a pipeline sequence.

pyyaks.task.end(message=None, context_file=None, context_keys=None)

End a pipeline sequence.

pyyaks.task.make_dir(*args, **kwargs)

Make a directory if it doesn’t exist.

Table Of Contents

Previous topic

pyyaks.shell

This Page