Skip to content

Commit 6a6de1d

Browse files
authored
Merge pull request #3296 from mirpedrol/fix-nextflow-language-server-template
Template: Remove `def` from `nextflow.config` and add `trace_report_suffix` param
2 parents 4e4bbaa + d56c87c commit 6a6de1d

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- fix workflow_dispatch trigger and parse more review comments in awsfulltest ([#3235](https://github.com/nf-core/tools/pull/3235))
1111
- Add resource limits to Gitpod profile([#3255](https://github.com/nf-core/tools/pull/3255))
1212
- Fix a typo ([#3268](https://github.com/nf-core/tools/pull/3268))
13+
- Remove `def` from `nextflow.config` and add `trace_report_suffix` param ([#3296](https://github.com/nf-core/tools/pull/3296))
1314

1415
### Download
1516

nf_core/pipeline-template/nextflow.config

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ params {
5252
version = false
5353
{%- if test_config %}
5454
pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'{% endif %}
55+
trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
5556

5657
{%- if nf_core_configs -%}
5758
// Config options
@@ -249,22 +250,21 @@ set -C # No clobber - prevent output redirection from overwriting files.
249250
// Disable process selector warnings by default. Use debug profile to enable warnings.
250251
nextflow.enable.configProcessNamesValidation = false
251252

252-
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
253253
timeline {
254254
enabled = true
255-
file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
255+
file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html"
256256
}
257257
report {
258258
enabled = true
259-
file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html"
259+
file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html"
260260
}
261261
trace {
262262
enabled = true
263-
file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
263+
file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt"
264264
}
265265
dag {
266266
enabled = true
267-
file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
267+
file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html"
268268
}
269269

270270
manifest {

nf_core/pipeline-template/nextflow_schema.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,13 @@
229229
"description": "Base URL or local path to location of pipeline test dataset files",
230230
"default": "https://raw.githubusercontent.com/nf-core/test-datasets/",
231231
"hidden": true
232-
}{% endif %}
232+
}{% endif %},
233+
"trace_report_suffix": {
234+
"type": "string",
235+
"fa_icon": "far calendar",
236+
"description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.",
237+
"hidden": true
238+
}
233239
}
234240
}
235241
},

nf_core/pipelines/schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def _update_validation_plugin_from_config(self) -> None:
9696
conf.get("validation.help.shortParameter", "help"),
9797
conf.get("validation.help.fullParameter", "helpFull"),
9898
conf.get("validation.help.showHiddenParameter", "showHidden"),
99+
"trace_report_suffix", # report suffix should be ignored by default as it is a Java Date object
99100
] # Help parameter should be ignored by default
100101
ignored_params_config_str = conf.get("validation.defaultIgnoreParams", "")
101102
ignored_params_config = [

0 commit comments

Comments
 (0)