Skip to content

Commit 64fc695

Browse files
authored
Remove legacy provenance format (#48)
1 parent 1dfb0e9 commit 64fc695

File tree

7 files changed

+47
-200
lines changed

7 files changed

+47
-200
lines changed

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# nf-prov
22

3-
Nextflow plugin to render provenance reports for pipeline runs. Now supporting [BioCompute Object](https://biocomputeobject.org/)!
3+
Nextflow plugin to render provenance reports for pipeline runs. Supports standard formats such as [BioCompute Object](https://biocomputeobject.org/) and [Workflow Run RO-Crate](https://www.researchobject.org/workflow-run-crate/).
4+
5+
## Requirements
6+
7+
| Version | Minimum Nextflow version |
8+
| ------- | ------------------------ |
9+
| 1.5.x | 25.04 |
10+
| 1.4.x | 24.10 |
11+
| 1.3.x | 24.10 |
12+
| 1.2.x | 23.04 |
13+
| 1.1.x | 23.04 |
14+
| 1.0.x | 22.04 |
415

516
## Getting Started
617

@@ -14,20 +25,28 @@ plugins {
1425
prov {
1526
enabled = true
1627
formats {
17-
legacy {
18-
file = 'manifest.json'
28+
bco {
29+
file = 'bco.json'
30+
overwrite = true
31+
}
32+
wrroc {
33+
file = 'ro-crate-metadata.json'
1934
overwrite = true
2035
}
2136
}
2237
}
2338
```
2439

25-
Finally, run your Nextflow pipeline. You do not need to modify your pipeline script in order to use the `nf-prov` plugin. The plugin will automatically produce the specified provenance reports at the end of the workflow run.
40+
Any number of formats can be specified. You do not need to modify your pipeline script in order to use the `nf-prov` plugin.
41+
42+
When you run your Nextflow pipeline, the plugin will automatically produce the specified provenance reports at the end of the run.
2643

2744
## Configuration
2845

2946
*The `file`, `format`, and `overwrite` options have been deprecated since version 1.2.0. Use `formats` instead.*
3047

48+
*The `legacy` format was removed in version 1.5.0. Consider using [data lineage](https://nextflow.io/docs/latest/data-lineage.html) instead.*
49+
3150
The following options are available:
3251

3352
`prov.enabled`
@@ -42,31 +61,10 @@ Configuration scope for the desired output formats. The following formats are av
4261

4362
- `dag`: Render the task graph as a Mermaid diagram embedded in an HTML document. Supports the `file` and `overwrite` options.
4463

45-
*Deprecated in version 1.4.0*
46-
47-
- `legacy`: Render the legacy format originally defined in this plugin (default). Supports the `file` and `overwrite` options.
48-
4964
*New in version 1.4.0*
5065

5166
- `wrroc`: Render a [Workflow Run RO-Crate](https://www.researchobject.org/workflow-run-crate/). Includes all three profiles (Process, Workflow, and Provenance). See [WRROC.md](docs/WRROC.md) for more information about the additional config options for WRROC.
5267

53-
Any number of formats can be specified, for example:
54-
55-
```groovy
56-
prov {
57-
formats {
58-
bco {
59-
file = 'bco.json'
60-
overwrite = true
61-
}
62-
wrroc {
63-
file = 'ro-crate-metadata.json'
64-
overwrite = true
65-
}
66-
}
67-
}
68-
```
69-
7068
See the [nf-prov-test](./nf-prov-test) directory for an example pipeline that produces every provenance format.
7169

7270
`prov.patterns`

nf-prov-test/nextflow.config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ prov {
1919
file = "${params.outdir}/dag.html"
2020
overwrite = true
2121
}
22-
legacy {
23-
file = "${params.outdir}/manifest.json"
24-
overwrite = true
25-
}
2622
wrroc {
2723
file = "${params.outdir}/ro-crate-metadata.json"
2824
overwrite = true

src/main/groovy/nextflow/prov/ProvConfig.groovy

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package nextflow.prov
1818

19+
import groovy.transform.CompileStatic
20+
import groovy.util.logging.Slf4j
1921
import nextflow.config.schema.ConfigOption
2022
import nextflow.config.schema.ConfigScope
2123
import nextflow.config.schema.ScopeName
@@ -25,6 +27,7 @@ import nextflow.script.dsl.Description
2527
@Description('''
2628
The `prov` scope allows you to configure the `nf-prov` plugin.
2729
''')
30+
@CompileStatic
2831
class ProvConfig implements ConfigScope {
2932

3033
@ConfigOption
@@ -54,29 +57,37 @@ class ProvConfig implements ConfigScope {
5457
}
5558

5659

60+
@Slf4j
61+
@CompileStatic
5762
class ProvFormatsConfig implements ConfigScope {
5863

59-
@Description('Configuration scope for the BCO output format.')
64+
@Description('''
65+
Configuration scope for the BCO output format.
66+
''')
6067
final ProvBcoConfig bco
6168

62-
@Description('Configuration scope for the DAG output format.')
69+
@Description('''
70+
Configuration scope for the DAG output format.
71+
''')
6372
final ProvDagConfig dag
6473

65-
@Description('Configuration scope for the legacy output format.')
66-
final ProvLegacyConfig legacy
67-
68-
@Description('Configuration scope for the WRROC output format.')
74+
@Description('''
75+
Configuration scope for the WRROC output format.
76+
''')
6977
final ProvWrrocConfig wrroc
7078

7179
ProvFormatsConfig(Map opts) {
7280
bco = opts.bco ? new ProvBcoConfig(opts.bco as Map) : null
7381
dag = opts.dag ? new ProvDagConfig(opts.dag as Map) : null
74-
legacy = opts.legacy ? new ProvLegacyConfig(opts.legacy as Map) : null
7582
wrroc = opts.wrroc ? new ProvWrrocConfig(opts.wrroc as Map) : null
83+
84+
if( opts.legacy )
85+
log.warn "The `legacy` provenance format is no longer supported"
7686
}
7787
}
7888

7989

90+
@CompileStatic
8091
class ProvBcoConfig implements ConfigScope {
8192

8293
@ConfigOption
@@ -87,7 +98,7 @@ class ProvBcoConfig implements ConfigScope {
8798

8899
@ConfigOption
89100
@Description('''
90-
When `true` overwrites any existing BCO manifest with the same name.
101+
When `true` overwrites any existing BCO manifest with the same name (default: `false`).
91102
''')
92103
final boolean overwrite
93104

@@ -98,6 +109,7 @@ class ProvBcoConfig implements ConfigScope {
98109
}
99110

100111

112+
@CompileStatic
101113
class ProvDagConfig implements ConfigScope {
102114

103115
@ConfigOption
@@ -108,7 +120,7 @@ class ProvDagConfig implements ConfigScope {
108120

109121
@ConfigOption
110122
@Description('''
111-
When `true` overwrites any existing DAG diagram with the same name.
123+
When `true` overwrites any existing DAG diagram with the same name (default: `false`).
112124
''')
113125
boolean overwrite
114126

@@ -119,27 +131,7 @@ class ProvDagConfig implements ConfigScope {
119131
}
120132

121133

122-
class ProvLegacyConfig implements ConfigScope {
123-
124-
@ConfigOption
125-
@Description('''
126-
The file name of the legacy manifest.
127-
''')
128-
final String file
129-
130-
@ConfigOption
131-
@Description('''
132-
When `true` overwrites any existing legacy manifest with the same name.
133-
''')
134-
final boolean overwrite
135-
136-
ProvLegacyConfig(Map opts) {
137-
file = opts.file
138-
overwrite = opts.overwrite as boolean
139-
}
140-
}
141-
142-
134+
@CompileStatic
143135
class ProvWrrocConfig implements ConfigScope {
144136

145137
@ConfigOption
@@ -150,7 +142,7 @@ class ProvWrrocConfig implements ConfigScope {
150142

151143
@ConfigOption
152144
@Description('''
153-
When `true` overwrites any existing Workflow Run RO-Crate with the same name.
145+
When `true` overwrites any existing Workflow Run RO-Crate with the same name (default: `false`).
154146
''')
155147
final boolean overwrite
156148

src/main/groovy/nextflow/prov/ProvObserver.groovy

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import nextflow.Session
2828
import nextflow.processor.TaskRun
2929
import nextflow.prov.renderers.BcoRenderer
3030
import nextflow.prov.renderers.DagRenderer
31-
import nextflow.prov.renderers.LegacyRenderer
3231
import nextflow.prov.renderers.WrrocRenderer
3332
import nextflow.trace.TraceObserverV2
3433
import nextflow.trace.event.FilePublishEvent
@@ -77,11 +76,6 @@ class ProvObserver implements TraceObserverV2 {
7776
if( config.dag )
7877
result.add(new DagRenderer(config.dag))
7978

80-
if( config.legacy ) {
81-
log.warn "The legacy format is deprecated -- it will be removed in a future version"
82-
result.add(new LegacyRenderer(config.legacy))
83-
}
84-
8579
if( config.wrroc )
8680
result.add(new WrrocRenderer(config.wrroc))
8781

@@ -158,7 +152,6 @@ class ProvObserver implements TraceObserverV2 {
158152
return switch( renderer ) {
159153
case BcoRenderer -> 'BCO';
160154
case DagRenderer -> 'DAG';
161-
case LegacyRenderer -> 'legacy';
162155
case WrrocRenderer -> 'WRROC';
163156
default -> null;
164157
}

src/main/groovy/nextflow/prov/ProvObserverFactory.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ProvObserverFactory implements TraceObserverFactoryV2 {
4444
return null
4545

4646
if( !config.formats ) {
47-
log.warn "Config setting `prov.formats` is not defined, no provenance reports will be produced"
47+
log.warn "Config setting `prov.formats` is not defined -- no provenance reports will be produced"
4848
return null
4949
}
5050

src/main/groovy/nextflow/prov/ProvPlugin.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package nextflow.prov
1818

1919
import groovy.transform.CompileStatic
2020
import nextflow.plugin.BasePlugin
21-
import nextflow.plugin.Scoped
2221
import org.pf4j.PluginWrapper
2322

2423
/**

src/main/groovy/nextflow/prov/renderers/LegacyRenderer.groovy

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)