Skip to content

Commit

Permalink
Merge pull request #3296 from mirpedrol/fix-nextflow-language-server-…
Browse files Browse the repository at this point in the history
…template

Template: Remove `def` from `nextflow.config` and add `trace_report_suffix` param
  • Loading branch information
mirpedrol authored Nov 26, 2024
2 parents 4e4bbaa + d56c87c commit 6a6de1d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- fix workflow_dispatch trigger and parse more review comments in awsfulltest ([#3235](https://github.com/nf-core/tools/pull/3235))
- Add resource limits to Gitpod profile([#3255](https://github.com/nf-core/tools/pull/3255))
- Fix a typo ([#3268](https://github.com/nf-core/tools/pull/3268))
- Remove `def` from `nextflow.config` and add `trace_report_suffix` param ([#3296](https://github.com/nf-core/tools/pull/3296))

### Download

Expand Down
10 changes: 5 additions & 5 deletions nf_core/pipeline-template/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ params {
version = false
{%- if test_config %}
pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'{% endif %}
trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')

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

def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html"
}
report {
enabled = true
file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html"
file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html"
}
trace {
enabled = true
file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt"
}
dag {
enabled = true
file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html"
}

manifest {
Expand Down
8 changes: 7 additions & 1 deletion nf_core/pipeline-template/nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,13 @@
"description": "Base URL or local path to location of pipeline test dataset files",
"default": "https://raw.githubusercontent.com/nf-core/test-datasets/",
"hidden": true
}{% endif %}
}{% endif %},
"trace_report_suffix": {
"type": "string",
"fa_icon": "far calendar",
"description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.",
"hidden": true
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions nf_core/pipelines/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def _update_validation_plugin_from_config(self) -> None:
conf.get("validation.help.shortParameter", "help"),
conf.get("validation.help.fullParameter", "helpFull"),
conf.get("validation.help.showHiddenParameter", "showHidden"),
"trace_report_suffix", # report suffix should be ignored by default as it is a Java Date object
] # Help parameter should be ignored by default
ignored_params_config_str = conf.get("validation.defaultIgnoreParams", "")
ignored_params_config = [
Expand Down

0 comments on commit 6a6de1d

Please sign in to comment.