exportPipeline: Export a pipeline and its components to disk

Description Usage Arguments Details Value See Also Examples

Description

Exports a pipeline and its referenced components to disk as OpenAPI XML files.

Usage

1
exportPipeline(pipeline, targetDirectory)

Arguments

pipeline

A pipeline list

targetDirectory

Output directory path

Details

Creates a directory named for the pipeline in targetDirectory, then saves pipeline and component XML files in this directory.

The pipeline is exported as ‘pipeline.xml’, and the components are exported as ‘COMPONENT_NAME.xml’.

This functions aims to produce self-contained pipelines with all components available alongside the pipeline XML file.

Value

A list of the XML file paths written

See Also

pipeline, savePipeline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## create a pipeline
mod1 <- module(name = "setX", language = moduleLanguage("R"),
               description = "sets the value of x",
               outputs = list(
                   moduleOutput(
                       name = "x",
                       vessel = internalVessel("x"),
                       format = ioFormat("R character string"))),
               sources = list(
                   moduleSource(
                       vessel = scriptVessel("x <- \"set\""))))
mod2 <- module("showY", language = moduleLanguage("R"),
               description = "displays the value of Y",
               inputs = list(
                   moduleInput(
                       name = "y",
                       vessel = internalVessel("y"),
                       format = ioFormat("R character string"))),
               sources = list(
                   moduleSource(
                       vessel = scriptVessel("print(y)"))))
pline1 <- pipeline(name = "trivialpipeline", components = list(mod1, mod2), 
                   pipes = list(pipe("setX", "x", "showY", "y")))
outputDir <- tempdir()

## export the pipeline to 'outputDir'
exportPipeline(pline1, outputDir)

anhinton/conduit documentation built on May 10, 2019, 11:48 a.m.