Skip to content

Commit

Permalink
fix uniqueEntries
Browse files Browse the repository at this point in the history
  • Loading branch information
nvnieuwk committed Oct 17, 2024
1 parent 2e164ec commit 9b965ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
## Bug fixes

1. The directory `nf_test_output` is now an ignored parameter during validation to support use of both `nf_test` and `nf_schema`.
2. `uniqueEntries` will now skip unique checks when all values in the requested array properties are empty. This had to be implemented to allow optional values to work with the `uniqueEntries` check. Partially filled in array properties will still fail (and that's how it's meant to be). Be sure to use `oneOf` to properly configure all possible combinations in case this causes some issues.

## Documentation

1. Fix some faults in the docs

# Version 2.1.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class UniqueEntriesEvaluator implements Evaluator {
.findAll { k,v -> uniqueEntries.contains(k) }
.collectEntries { k,v -> [k, v.asString()] }
for (uniqueNode : uniques) {
if(filteredNodes.equals(uniqueNode)) {
return Evaluator.Result.failure("Entry ${count}: Detected non-unique combination of the following fields: ${uniqueEntries}" as String)
if(filteredNodes.equals(uniqueNode) && filteredNodes != [:]) {
return Evaluator.Result.failure("Entry ${count}: Detected non-unique combination of the following fields: ${filteredNodes}" as String)
}
}
uniques.add(filteredNodes)
Expand Down
2 changes: 1 addition & 1 deletion plugins/nf-schema/src/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Plugin-Id: nf-schema
Plugin-Version: 2.1.1
Plugin-Version: 2.1.2-dev
Plugin-Class: nextflow.validation.ValidationPlugin
Plugin-Provider: nextflow
Plugin-Requires: >=23.10.0

0 comments on commit 9b965ce

Please sign in to comment.