Skip to content

Commit ea12846

Browse files
bentshermanpditommasochristopher-hakkaart
authored
Workflow output definition (second preview) (#5185)
Signed-off-by: Ben Sherman <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Christopher Hakkaart <[email protected]>
1 parent a818f4b commit ea12846

File tree

17 files changed

+422
-349
lines changed

17 files changed

+422
-349
lines changed

docs/reference/cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,11 @@ The `run` command is used to execute a local pipeline script or remote pipeline
10151015
`-offline`
10161016
: Do not check for remote project updates.
10171017

1018+
`-o, -output-dir` (`results`)
1019+
: :::{versionadded} 24.10.0
1020+
:::
1021+
: Directory where workflow outputs are stored.
1022+
10181023
`-params-file`
10191024
: Load script parameters from a JSON/YAML file.
10201025

docs/reference/config.md

Lines changed: 84 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ This page lists all of the available settings in the {ref}`Nextflow configuratio
1818
`dumpHashes`
1919
: If `true`, dump task hash keys in the log file, for debugging purposes. Equivalent to the `-dump-hashes` option of the `run` command.
2020

21+
`outputDir`
22+
: :::{versionadded} 24.10.0
23+
:::
24+
: Defines the pipeline output directory. Equivalent to the `-output-dir` option of the `run` command.
25+
2126
`resume`
2227
: If `true`, enable the use of previously cached task executions. Equivalent to the `-resume` option of the `run` command.
2328

@@ -1226,27 +1231,9 @@ Read the {ref}`sharing-page` page to learn how to publish your pipeline to GitHu
12261231

12271232
## `nextflow`
12281233

1229-
The `nextflow` scope provides configuration options for the Nextflow runtime.
1230-
1231-
`nextflow.publish.retryPolicy.delay`
1232-
: :::{versionadded} 24.03.0-edge
1233-
:::
1234-
: Delay when retrying a failed publish operation (default: `350ms`).
1235-
1236-
`nextflow.publish.retryPolicy.jitter`
1237-
: :::{versionadded} 24.03.0-edge
1238-
:::
1239-
: Jitter value when retrying a failed publish operation (default: `0.25`).
1240-
1241-
`nextflow.publish.retryPolicy.maxAttempt`
1242-
: :::{versionadded} 24.03.0-edge
1243-
:::
1244-
: Max attempts when retrying a failed publish operation (default: `5`).
1245-
1246-
`nextflow.publish.retryPolicy.maxDelay`
1247-
: :::{versionadded} 24.03.0-edge
1248-
:::
1249-
: Max delay when retrying a failed publish operation (default: `90s`).
1234+
:::{deprecated} 24.10.0
1235+
The `nextflow.publish` scope has been renamed to `workflow.output`. See {ref}`config-workflow` for more information.
1236+
:::
12501237

12511238
(config-notification)=
12521239

@@ -1600,6 +1587,9 @@ The following settings are available:
16001587

16011588
## `workflow`
16021589

1590+
:::{versionadded} 24.10.0
1591+
:::
1592+
16031593
The `workflow` scope provides workflow execution options.
16041594

16051595
`workflow.failOnIgnore`
@@ -1612,3 +1602,76 @@ The `workflow` scope provides workflow execution options.
16121602

16131603
`workflow.onError`
16141604
: Specify a closure that will be invoked if a workflow run is terminated. See {ref}`workflow-handlers` for more information.
1605+
1606+
`workflow.output.contentType`
1607+
: *Currently only supported for S3.*
1608+
: Specify the media type, also known as [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types), of published files (default: `false`). Can be a string (e.g. `'text/html'`), or `true` to infer the content type from the file extension.
1609+
1610+
`workflow.output.enabled`
1611+
: Enable or disable publishing (default: `true`).
1612+
1613+
`workflow.output.ignoreErrors`
1614+
: When `true`, the workflow will not fail if a file can't be published for some reason (default: `false`).
1615+
1616+
`workflow.output.mode`
1617+
: The file publishing method (default: `'symlink'`). The following options are available:
1618+
1619+
`'copy'`
1620+
: Copy each file into the output directory.
1621+
1622+
`'copyNoFollow'`
1623+
: Copy each file into the output directory without following symlinks, i.e. only the link is copied.
1624+
1625+
`'link'`
1626+
: Create a hard link in the output directory for each file.
1627+
1628+
`'move'`
1629+
: Move each file into the output directory.
1630+
: Should only be used for files which are not used by downstream processes in the workflow.
1631+
1632+
`'rellink'`
1633+
: Create a relative symbolic link in the output directory for each file.
1634+
1635+
`'symlink'`
1636+
: Create an absolute symbolic link in the output directory for each output file.
1637+
1638+
`workflow.output.overwrite`
1639+
: When `true` any existing file in the specified folder will be overwritten (default: `'standard'`). The following options are available:
1640+
1641+
`false`
1642+
: Never overwrite existing files.
1643+
1644+
`true`
1645+
: Always overwrite existing files.
1646+
1647+
`'deep'`
1648+
: Overwrite existing files when the file content is different.
1649+
1650+
`'lenient'`
1651+
: Overwrite existing files when the file size is different.
1652+
1653+
`'standard'`
1654+
: Overwrite existing files when the file size or last modified timestamp is different.
1655+
1656+
`workflow.output.retryPolicy.delay`
1657+
: Delay when retrying a failed publish operation (default: `350ms`).
1658+
1659+
`workflow.output.retryPolicy.jitter`
1660+
: Jitter value when retrying a failed publish operation (default: `0.25`).
1661+
1662+
`workflow.output.retryPolicy.maxAttempt`
1663+
: Max attempts when retrying a failed publish operation (default: `5`).
1664+
1665+
`workflow.output.retryPolicy.maxDelay`
1666+
: Max delay when retrying a failed publish operation (default: `90s`).
1667+
1668+
`workflow.output.storageClass`
1669+
: *Currently only supported for S3.*
1670+
: Specify the storage class for published files.
1671+
1672+
`workflow.output.tags`
1673+
: *Currently only supported for S3.*
1674+
: Specify arbitrary tags for published files. For example:
1675+
```groovy
1676+
tags FOO: 'hello', BAR: 'world'
1677+
```

docs/reference/stdlib.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ The following constants are globally available in a Nextflow script:
128128
`workflow.manifest`
129129
: Entries of the workflow manifest.
130130

131+
`workflow.outputDir`
132+
: :::{versionadded} 24.10.0
133+
:::
134+
: Workflow output directory.
135+
131136
`workflow.preview`
132137
: :::{versionadded} 24.04.0
133138
:::

0 commit comments

Comments
 (0)