diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e3796e..4a617c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # nextflow-io/nf-schema: Changelog -# Version 2.1.0 +# Version 2.1.1 + +## Bug fixes + +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 + +# Version 2.1.0 - Tantanmen ## Breaking changes diff --git a/README.md b/README.md index dd61974b..c55a34c6 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Declare the plugin in your Nextflow pipeline configuration file: ```groovy title="nextflow.config" plugins { - id 'nf-schema@2.1.0' + id 'nf-schema@2.1.1' } ``` diff --git a/docs/parameters/help_text.md b/docs/parameters/help_text.md index 893effff..e7c3d20f 100644 --- a/docs/parameters/help_text.md +++ b/docs/parameters/help_text.md @@ -5,7 +5,7 @@ Add the following configuration to your configuration files to enable the creati ```groovy title="nextflow.config" validation { help { - enabled: true + enabled = true } } ``` diff --git a/plugins/nf-schema/src/main/nextflow/validation/SchemaValidator.groovy b/plugins/nf-schema/src/main/nextflow/validation/SchemaValidator.groovy index 2b1ce7d9..61aa1bbc 100644 --- a/plugins/nf-schema/src/main/nextflow/validation/SchemaValidator.groovy +++ b/plugins/nf-schema/src/main/nextflow/validation/SchemaValidator.groovy @@ -232,8 +232,8 @@ class SchemaValidator extends PluginExtensionPoint { // Initialise expected params if not present // Map initialiseExpectedParams(Map params) { - if( !params.containsKey("help") ) { - params.help = false + addExpectedParams().each { param -> + params[param] = false } return params } @@ -244,7 +244,9 @@ class SchemaValidator extends PluginExtensionPoint { // List addExpectedParams() { def List expectedParams = [ - "help" + config.help.shortParameter, + config.help.fullParameter, + config.help.showHiddenParameter ] return expectedParams @@ -364,10 +366,9 @@ class SchemaValidator extends PluginExtensionPoint { Map options = [:], String command ) { - // TODO add link to help message migration guide once created if (!options.containsKey("hideWarning") || options.hideWarning == false) { log.warn(""" -Using `paramsHelp()` is not recommended. Check out the help message migration guide: +Using `paramsHelp()` is not recommended. Check out the help message migration guide: https://nextflow-io.github.io/nf-schema/latest/migration_guide/#updating-the-help-message If you intended to use this function, please add the following option to the input of the function: `hideWarning: true` diff --git a/plugins/nf-schema/src/resources/META-INF/MANIFEST.MF b/plugins/nf-schema/src/resources/META-INF/MANIFEST.MF index 028c9086..fff7b0cf 100644 --- a/plugins/nf-schema/src/resources/META-INF/MANIFEST.MF +++ b/plugins/nf-schema/src/resources/META-INF/MANIFEST.MF @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Plugin-Id: nf-schema -Plugin-Version: 2.1.0 +Plugin-Version: 2.1.1 Plugin-Class: nextflow.validation.ValidationPlugin Plugin-Provider: nextflow Plugin-Requires: >=23.10.0