Skip to content

Commit 311c829

Browse files
authored
Merge pull request #173 from nextflow-io/2.5.0dev
Release 2.5.0
2 parents abe671d + e202a15 commit 311c829

File tree

110 files changed

+1708
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1708
-595
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
with:
5252
name: test-reports-jdk-${{ matrix.java_version }}
5353
path: |
54-
./plugins/nf-schema/build/reports/tests/test/**
54+
./plugins/nf-schema/build/reports/tests/test/**

.github/workflows/examples.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check examples
2+
on:
3+
push:
4+
tags-ignore:
5+
- '*'
6+
pull_request:
7+
jobs:
8+
check_examples:
9+
name: Check examples output
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 1
17+
submodules: true
18+
19+
- name: Setup Java 21
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: 21
23+
distribution: 'adopt'
24+
architecture: x64
25+
cache: gradle
26+
27+
- name: Setup Nextflow
28+
uses: nf-core/setup-nextflow@v2
29+
with:
30+
version: "latest-stable"
31+
32+
- name: Install nf-schema
33+
run: make install
34+
35+
- name: Check examples
36+
run: bash examples/check_examples.sh

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# nextflow-io/nf-schema: Changelog
22

3+
# Version 2.5.0
4+
5+
## New features
6+
7+
1. Added a new configuration option: `validation.help.enumLength` which sets the maximum length of enum values in the help message. The default is set to the value in the `COLUMNS` environment variable or 100 character if that variable isn't set.
8+
2. Added top-level schema description for detailed help `--help <args>`. If `<args>` is associated with a schema, then the top-level fields will be shown similarly to `--help` for the main schema (#146).
9+
3. Added a Troubleshooting and FAQ page to the documentation.
10+
11+
## Changes
12+
13+
1. The plugin now properly validates cloud storage files instead of skipping them. Exotic errors will be added to the error messages instead of failing the validation outright.
14+
2. Migrated to the new observer class in Nextflow 25.04.0
15+
3. Rework the deprecated `paramsHelp()` function to allow pipeline developers a fully fledged alternative to the help messages created via the configuration options. This change enables the use of dynamic help message with the strict configuration syntax introduced in Nextflow 25.04.0.
16+
4. Updated the error message when the JSON schema file is invalid to include the full file name.
17+
5. The ANSI log setting of Nextflow is now used to determine whether or not the log should be monochrome. This setting will take priority over the `validation.monochromeLogs` configuration option.
18+
6. Updated the examples in the [examples](examples/) directory and added automatic checking for validity of these examples.
19+
7. Refactored logic for parsing the `jsonschema` validation result into a new `ValidationResult` class.
20+
21+
## Bug fixes
22+
23+
1. CSV and TSV files with trailing commas or tabs will now be properly sanitized. This fixes issues with CSV and TSV files that contained empty header columns.
24+
2. Unidentified parameters are no longer printed out on failure of the parameter validation. This is to prevent a bug where all parameters would be printed out on failure.
25+
3. Fixed an issue where default values of `null` weren't being set correctly in `samplesheetToList()`.
26+
4. Fixed an undocumented limit of `3MB` for `YAML` format samplesheets (new limit is `50MB`).
27+
5. Fixed issue where an empty string in a yaml for a file type string format would throw a Java error instead of reporting a proper validation error.
28+
29+
## Logging configuration
30+
31+
This update contains a rework of the logging configuration. The `valdiation.logging` configuration scope has been added with options to replace and expand the current logging configuration options. These options can all take the following values:
32+
33+
- `skip`: Skip logging
34+
- `debug`: Log debug messages (only printed in the `.nextflow.log` file)
35+
- `info`: Log info messages (also printed in the terminal)
36+
- `warn`: Log warning messages (also printed in the terminal, but in yellow)
37+
- `error`: Fail the pipeline and print the error message
38+
39+
| Old option | New option | Description |
40+
| ------------------------------------ | ---------------------------------------- | ----------------------------------------------------------- |
41+
| `validation.failUnrecognisedParams` | `validation.logging.unrecognisedParams` | The logging level for unrecognised parameters. |
42+
| `validation.failUnrecognisedHeaders` | `validation.logging.unrecognisedHeaders` | The logging level for unrecognised headers in samplesheets. |
43+
344
# Version 2.4.2
445

546
## Bug fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Declare the plugin in your Nextflow pipeline configuration file:
2525

2626
```groovy title="nextflow.config"
2727
plugins {
28-
id 'nf-schema@2.4.1'
28+
id 'nf-schema@2.5.0'
2929
}
3030
```
3131

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'io.nextflow.nextflow-plugin' version '0.0.1-alpha2'
2+
id 'io.nextflow.nextflow-plugin' version '0.0.1-alpha3'
33
}
44

55
dependencies {
@@ -8,14 +8,15 @@ dependencies {
88
implementation 'com.sanctionco.jmail:jmail:1.6.3' // Needed for e-mail format validation
99
}
1010

11-
version = '2.4.2'
11+
version = '2.5.0'
1212

1313
nextflowPlugin {
14-
nextflowVersion = '24.10.0'
14+
nextflowVersion = '25.04.0'
1515

1616
provider = 'nextflow'
1717
className = 'nextflow.validation.ValidationPlugin'
1818
extensionPoints = [
19+
'nextflow.validation.config.ValidationConfig',
1920
'nextflow.validation.ValidationExtension',
2021
'nextflow.validation.ValidationObserverFactory'
2122
]

buildSrc/build.gradle

Lines changed: 0 additions & 14 deletions
This file was deleted.

buildSrc/src/main/groovy/io.nextflow.groovy-application-conventions.gradle

Lines changed: 0 additions & 11 deletions
This file was deleted.

buildSrc/src/main/groovy/io.nextflow.groovy-common-conventions.gradle

Lines changed: 0 additions & 28 deletions
This file was deleted.

buildSrc/src/main/groovy/io.nextflow.groovy-library-conventions.gradle

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/configuration/configuration.md

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This option can either be a path relative to the root of the pipeline directory
3232

3333
## monochromeLogs
3434

35-
This option can be used to turn of the colored logs from nf-validation. This can be useful if you run a Nextflow pipeline in an environment that doesn't support colored logging.
35+
This option can be used to turn of the colored logs from nf-schema. This can be useful if you run a Nextflow pipeline in an environment that doesn't support colored logging. This option will automatically be set to `true` when ANSI logging is disabled in Nextflow.
3636

3737
```groovy
3838
validation.monochromeLogs = <true|false> // default: false
@@ -46,22 +46,6 @@ This option can be used to make the type validation more lenient. In normal case
4646
validation.lenientMode = <true|false> // default: false
4747
```
4848

49-
## failUnrecognisedParams
50-
51-
By default the `validateParameters()` function will only give a warning if an unrecognised parameter has been given. This usually indicates that a typo has been made and can be easily overlooked when the plugin only emits a warning. You can turn this warning into an error with the `failUnrecognisedParams` option.
52-
53-
```groovy
54-
validation.failUnrecognisedParams = <true|false> // default: false
55-
```
56-
57-
## failUnrecognisedHeaders
58-
59-
By default the `samplesheetToList()` function will only give a warning if an unrecognised header is present in the samplesheet. This usually indicates that a typo has been made and can be easily overlooked when the plugin only emits a warning. You can turn this warning into an error with the `failUnrecognisedHeaders` option.
60-
61-
```groovy
62-
validation.failUnrecognisedHeaders = <true|false> // default: false
63-
```
64-
6549
## showHiddenParams
6650

6751
!!! deprecated
@@ -213,6 +197,16 @@ validation.help.afterText = "Please cite the pipeline owners when using this pip
213197

214198
All color values (like `\033[0;31m`, which means the color red) will be filtered out when `validation.monochromeLogs` is set to `true`
215199

200+
### enumLength
201+
202+
This option can be used to set the maximum length of enum values in the help message. This is useful when the enum values are very long and would make the help message hard to read.
203+
204+
The default value is set to the value in the `COLUMNS` environment variable or 100 characters if that variable isn't set. Set this option to `-1` to disable the length limit.
205+
206+
```groovy
207+
validation.help.enumLength = <integer>
208+
```
209+
216210
## Summary
217211

218212
The `validation.summary` config scope can be used to configure the output of the `paramsSummaryLog()` function.
@@ -250,3 +244,32 @@ Takes a list of parameter names to exclude from the parameters summary created b
250244
```groovy
251245
validation.summary.hideParams = ["param1", "nested.param"] // default: []
252246
```
247+
248+
## Logging
249+
250+
The `validation.logging` config scope can be used to configure the logging of the plugin.
251+
These config options can receive the following values:
252+
253+
- `skip`: Skip logging
254+
- `debug`: Log debug messages (only printed in the `.nextflow.log` file)
255+
- `info`: Log info messages (also printed in the terminal)
256+
- `warn`: Log warning messages (also printed in the terminal, but in yellow)
257+
- `error`: Fail the pipeline and print the error message
258+
259+
This scope contains the following options:
260+
261+
### unrecognisedParams
262+
263+
This option can be used to configure the logging of unrecognised parameters.
264+
265+
```groovy
266+
validation.logging.unrecognisedParams = "warn" // default: "warn"
267+
```
268+
269+
### unrecognisedHeaders
270+
271+
This option can be used to configure the logging of unrecognised headers in samplesheets.
272+
273+
```groovy
274+
validation.logging.unrecognisedHeaders = "warn" // default: "warn"
275+
```

0 commit comments

Comments
 (0)