Renku Workflow

Renku uses PROV-O and its own Renku ontology to represent workflows.

Run

Represents a workflow template.

class renku.core.models.workflow.run.Run(*, commit=None, client=None, path=None, id=None, label=NOTHING, project: renku.core.models.projects.Project = None, command: str = None, process_order: int = None, successcodes: list = NOTHING, subprocesses=NOTHING, arguments=NOTHING, inputs=NOTHING, outputs=NOTHING)[source]

Represents a renku run execution template.

property activity

Return the activity object.

add_subprocess(subprocess, process_order=None)[source]

Adds a subprocess to this run.

as_jsonld()[source]

Create JSON-LD.

classmethod from_factory(factory, client, commit, path)[source]

Creates a Run from a CommandLineToolFactory.

classmethod from_jsonld(data)[source]

Create an instance from JSON-LD data.

static generate_id(client, commit)[source]

Generate an id for an argument.

set_process_order(process_order)[source]

Updates the process_order on a subprocess and its parameters.

to_argv()[source]

Convert run into argv list.

to_stream_repr()[source]

Input/output stream representation.

update_id_and_label_from_commit_path(client, commit, path)[source]

Updates the _id and _label using supplied commit and path.

class renku.core.models.workflow.run.RunSchema(*args, commit=None, client=None, **kwargs)[source]

Run schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of Run

Parameters

Represents a workflow template.

class renku.core.models.workflow.parameters.CommandArgument(*, id=None, label=None, position: int = None, prefix: str = None, value: str = None)[source]

An argument to a command that is neither input nor output.

as_jsonld()[source]

Create JSON-LD.

default_label()[source]

Set default label.

classmethod from_jsonld(data)[source]

Create an instance from JSON-LD data.

static generate_id(run_id, position=None)[source]

Generate an id for an argument.

to_argv()[source]

String representation (sames as cmd argument).

class renku.core.models.workflow.parameters.CommandArgumentSchema(*args, commit=None, client=None, **kwargs)[source]

CommandArgument schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of CommandArgument

class renku.core.models.workflow.parameters.CommandInput(*, id=None, label=None, position: int = None, prefix: str = None, consumes, mapped_to=None)[source]

An input to a command.

as_jsonld()[source]

Create JSON-LD.

default_label()[source]

Set default label.

classmethod from_jsonld(data)[source]

Create an instance from JSON-LD data.

static generate_id(run_id, position=None)[source]

Generate an id for an argument.

to_argv()[source]

String representation (sames as cmd argument).

to_stream_repr()[source]

Input stream representation.

class renku.core.models.workflow.parameters.CommandInputSchema(*args, commit=None, client=None, **kwargs)[source]

CommandArgument schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of CommandInput

class renku.core.models.workflow.parameters.CommandOutput(*, id=None, label=None, position: int = None, prefix: str = None, create_folder: bool = False, produces, mapped_to=None)[source]

An output of a command.

as_jsonld()[source]

Create JSON-LD.

default_label()[source]

Set default label.

classmethod from_jsonld(data)[source]

Create an instance from JSON-LD data.

static generate_id(run_id, position=None)[source]

Generate an id for an argument.

to_argv()[source]

String representation (sames as cmd argument).

to_stream_repr()[source]

Input stream representation.

class renku.core.models.workflow.parameters.CommandOutputSchema(*args, commit=None, client=None, **kwargs)[source]

CommandArgument schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of CommandOutput

class renku.core.models.workflow.parameters.CommandParameter(*, id=None, label=None, position: int = None, prefix: str = None)[source]

Represents a parameter for an execution template.

property sanitized_id

Return _id sanitized for use in non-jsonld contexts.

class renku.core.models.workflow.parameters.CommandParameterSchema(*args, commit=None, client=None, **kwargs)[source]

CommandParameter schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of CommandParameter

class renku.core.models.workflow.parameters.MappedIOStream(*, client=None, id, label=None, stream_type: str)[source]

Represents an IO stream (stdin, stdout, stderr).

as_jsonld()[source]

Create JSON-LD.

default_label()[source]

Set default label.

classmethod from_jsonld(data)[source]

Create an instance from JSON-LD data.

static generate_id(run_id, stream_type)[source]

Generate an id for a mapped stream.

class renku.core.models.workflow.parameters.MappedIOStreamSchema(*args, commit=None, client=None, **kwargs)[source]

MappedIOStream schema.

Create an instance.

class Meta[source]

Meta class.

model

alias of MappedIOStream

Renku Workflow Conversion

Renku allows conversion of tracked workflows to runnable workflows in supported tools (Currently CWL)

CWL

Converter for workflows to cwl.

class renku.core.models.workflow.converters.cwl.CWLConverter[source]

Converts a Run to cwl file(s).

static convert(run, client, path=None)[source]

Convert the workflow to one ore more .cwl files.