dalymi.pipeline

Pipeline

Pipeline(self)

The main API to generate dalymi pipelines.

input

Pipeline.input(self, *input)

A decorator to specify input resources for the decorated task.

Warning

A potential output decorator must wrap an input decorator to ensure correct pipeline functionality.

Arguments

  • *input: a list of resource objects

output

Pipeline.output(self, *output)

A decorator to specify output resources for the decorated task.

Warning

The output decorator must wrap a potential input decorator to ensure correct pipeline functionality.

Arguments

  • *output: a list of resource objects

cli

Pipeline.cli(self)

Runs the default command line interface of this Pipeline.

log

Pipeline.log(self, message)

Logs the supplied message to a Python logger named __name__ on log level INFO.

PipelineCLI

PipelineCLI(self, pipeline)

A class representing the command line interface of a Pipeline.

Arguments

  • pipeline (dalymi.pipeline.Pipeline): the pipeline object to create a CLI for.

Attributes

  • run_parser (argparse.ArgumentParser): handles the run sub-command
  • dot_parser (argparse.ArgumentParser): handles the dot sub-command
  • ls_parser (argparse.ArgumentParser): handles the ls sub-command

run

PipelineCLI.run(self, external_context={})

Parses arguments and runs the provided command.

dalymi.resources

LocalFileMixin

LocalFileMixin(self, /, *args, **kwargs)

Provides default check and delete methods for local file resources. Inherit from this before other resource classes to avoid NotImplementedError.

makedirs

LocalFileMixin.makedirs(self, path)

Convenience method to recursively create directories for a path if it does not exist. Could be called, for example, in the save method of a sub-class.