Skip to content

Commit d06b8c7

Browse files
authored
Merge pull request #49 from nextflow-io/more-patch-fixes
More patch fixes
2 parents c3eac9d + bcf222f commit d06b8c7

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
1. The help parameters are now no longer unexpected parameters when validating parameters.
88
2. Fixed a typo in the docs
99
3. Added a URL to the help message migration docs to the `paramsHelp()` deprecation message
10-
4. Resolved an issue where the UniqueEntriesEvaluator did not correctly detect non-unique combinations.
10+
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.
11+
5. Resolved an issue where the UniqueEntriesEvaluator did not correctly detect non-unique combinations.
1112

1213
# Version 2.1.0 - Tantanmen
1314

docs/migration_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ The creation of the help message now needs to be enabled in the configuration fi
284284
```groovy title="nextflow.config"
285285
validation {
286286
help {
287-
enabled: true
288-
command: "nextflow run my_pipeline --input input_file.csv"
287+
enabled = true
288+
command = "nextflow run my_pipeline --input input_file.csv"
289289
}
290290
}
291291
```

plugins/nf-schema/src/main/nextflow/validation/config/HelpConfig.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class HelpConfig {
2626
final public String command
2727
final public Boolean showHidden
2828

29-
HelpConfig(Map map, Map params, Boolean monochromeLogs) {
29+
HelpConfig(Map map, Map params, Boolean monochromeLogs, Boolean showHiddenParams) {
3030
def config = map ?: Collections.emptyMap()
3131
enabled = config.enabled ?: false
3232
shortParameter = config.shortParameter ?: "help"
@@ -41,6 +41,6 @@ class HelpConfig {
4141
afterText = config.afterText ?: ""
4242
command = config.command ?: ""
4343
}
44-
showHidden = params.get(showHiddenParameter) ?: config.showHidden ?: false
44+
showHidden = params.containsKey(showHiddenParameter) ? params.get(showHiddenParameter) : config.showHidden ?: showHiddenParams ?: false
4545
}
4646
}

plugins/nf-schema/src/main/nextflow/validation/config/ValidationConfig.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ValidationConfig {
2222
final public Boolean monochromeLogs
2323
final public Boolean failUnrecognisedParams
2424
final public String parametersSchema
25-
final public Boolean showHiddenParams = false
25+
final public Boolean showHiddenParams
2626
final public HelpConfig help
2727
final public SummaryConfig summary
2828

@@ -33,11 +33,12 @@ class ValidationConfig {
3333
lenientMode = config.lenientMode ?: false
3434
monochromeLogs = config.monochromeLogs ?: false
3535
failUnrecognisedParams = config.failUnrecognisedParams ?: false
36-
if(config.showHiddenParams) {
36+
showHiddenParams = config.showHiddenParams ?: false
37+
if(config.containsKey("showHiddenParams")) {
3738
log.warn("configuration option `validation.showHiddenParams` is deprecated, please use `validation.help.showHidden` or the `--showHidden` parameter instead")
3839
}
3940
parametersSchema = config.parametersSchema ?: "nextflow_schema.json"
40-
help = new HelpConfig(config.help as Map ?: [:], params, monochromeLogs)
41+
help = new HelpConfig(config.help as Map ?: [:], params, monochromeLogs, showHiddenParams)
4142
summary = new SummaryConfig(config.summary as Map ?: [:], monochromeLogs)
4243

4344
if(config.ignoreParams && !(config.ignoreParams instanceof List<String>)) {

0 commit comments

Comments
 (0)