Skip to content

Commit

Permalink
Merge pull request #49 from nextflow-io/more-patch-fixes
Browse files Browse the repository at this point in the history
More patch fixes
  • Loading branch information
nvnieuwk authored Sep 19, 2024
2 parents c3eac9d + bcf222f commit d06b8c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
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. Resolved an issue where the UniqueEntriesEvaluator did not correctly detect non-unique combinations.
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.
5. Resolved an issue where the UniqueEntriesEvaluator did not correctly detect non-unique combinations.

# Version 2.1.0 - Tantanmen

Expand Down
4 changes: 2 additions & 2 deletions docs/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,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"
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -41,6 +41,6 @@ class HelpConfig {
afterText = config.afterText ?: ""
command = config.command ?: ""
}
showHidden = params.get(showHiddenParameter) ?: config.showHidden ?: false
showHidden = params.containsKey(showHiddenParameter) ? params.get(showHiddenParameter) : config.showHidden ?: showHiddenParams ?: false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<String>)) {
Expand Down

0 comments on commit d06b8c7

Please sign in to comment.