From 717be2f524a0fc7d259361e80e0673e10d590cf5 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 26 Aug 2024 10:35:07 +0200 Subject: [PATCH 1/4] update typo in migration guide --- docs/migration_guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migration_guide.md b/docs/migration_guide.md index a427431..058e606 100644 --- a/docs/migration_guide.md +++ b/docs/migration_guide.md @@ -285,8 +285,8 @@ The creation of the help message now needs to be enabled in the configuration fi ```groovy title="nextflow.config" validation { help { - enabled: true - command: "nextflow run my_pipeline --input input_file.csv" + enabled = true + command = "nextflow run my_pipeline --input input_file.csv" } } ``` From 7f3fdfe79f169ad1caeebc39bc8f114f131519e4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 26 Aug 2024 10:43:30 +0200 Subject: [PATCH 2/4] fix a broken old config option --- .../src/main/nextflow/validation/config/HelpConfig.groovy | 4 ++-- .../nextflow/validation/config/ValidationConfig.groovy | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy b/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy index d184e48..e2db50c 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy @@ -26,7 +26,7 @@ class HelpConfig { final public String command final public Boolean showHidden - HelpConfig(Map map, Map params, Boolean monochromeLogs) { + HelpConfig(Map map, Map params, Boolean monochromeLogs, Boolean showHiddenParams) { def config = map ?: Collections.emptyMap() enabled = config.enabled ?: false shortParameter = config.shortParameter ?: "help" @@ -41,6 +41,6 @@ class HelpConfig { afterText = config.afterText ?: "" command = config.command ?: "" } - showHidden = params.get(showHiddenParameter) ?: config.showHidden ?: false + showHidden = params.get(showHiddenParameter) ?: config.showHidden ?: showHiddenParams ?: false } } \ No newline at end of file diff --git a/plugins/nf-schema/src/main/nextflow/validation/config/ValidationConfig.groovy b/plugins/nf-schema/src/main/nextflow/validation/config/ValidationConfig.groovy index 438f144..4ba51aa 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/config/ValidationConfig.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/config/ValidationConfig.groovy @@ -22,7 +22,7 @@ class ValidationConfig { final public Boolean monochromeLogs final public Boolean failUnrecognisedParams final public String parametersSchema - final public Boolean showHiddenParams = false + final public Boolean showHiddenParams final public HelpConfig help final public SummaryConfig summary @@ -33,11 +33,12 @@ class ValidationConfig { lenientMode = config.lenientMode ?: false monochromeLogs = config.monochromeLogs ?: false failUnrecognisedParams = config.failUnrecognisedParams ?: false - if(config.showHiddenParams) { + showHiddenParams = config.showHiddenParams ?: false + if(config.containsKey("showHiddenParams")) { log.warn("configuration option `validation.showHiddenParams` is deprecated, please use `validation.help.showHidden` or the `--showHidden` parameter instead") } parametersSchema = config.parametersSchema ?: "nextflow_schema.json" - help = new HelpConfig(config.help as Map ?: [:], params, monochromeLogs) + help = new HelpConfig(config.help as Map ?: [:], params, monochromeLogs, showHiddenParams) summary = new SummaryConfig(config.summary as Map ?: [:], monochromeLogs) if(config.ignoreParams && !(config.ignoreParams instanceof List)) { From 8674e0713218cd55adaeba2e4be2fec67a5eec26 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 26 Aug 2024 10:47:47 +0200 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a617c2..f796f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ 1. The help parameters are now no longer unexpected parameters when validating parameters. 2. Fixed a typo in the docs 3. Added a URL to the help message migration docs to the `paramsHelp()` deprecation message +4. The old `validation.showHiddenParams` config option works again to ensure backwards compatibility. Using `validation.help.showHidden` is still preffered and the old option will emit a deprecation message. # Version 2.1.0 - Tantanmen From f5ffe63ee8b07afc4897f600db04d5a96e7f05e6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 26 Aug 2024 13:03:18 +0200 Subject: [PATCH 4/4] fix an invalid parameter fetching --- .../src/main/nextflow/validation/config/HelpConfig.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy b/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy index e2db50c..76617ea 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy @@ -41,6 +41,6 @@ class HelpConfig { afterText = config.afterText ?: "" command = config.command ?: "" } - showHidden = params.get(showHiddenParameter) ?: config.showHidden ?: showHiddenParams ?: false + showHidden = params.containsKey(showHiddenParameter) ? params.get(showHiddenParameter) : config.showHidden ?: showHiddenParams ?: false } } \ No newline at end of file