diff --git a/docs/contributing/setup.md b/docs/contributing/setup.md index 0f28333..5282b52 100644 --- a/docs/contributing/setup.md +++ b/docs/contributing/setup.md @@ -13,9 +13,33 @@ To compile and run the tests use the following command: ./gradlew check ``` -## Launch it with Nextflow +## Launch it with installed Nextflow -To test with Nextflow for development purpose: +!!! warning + + This method will add the development version of the plugin to your Nextflow plugins + Take care when using this method and make sure that you are never using a + development version to run real pipelines. + You can delete all `nf-schema` versions using this command: + ```bash + rm -rf ~/.nextflow/plugins/nf-schema* + ``` + +Install the current version of the plugin in your `.nextflow/plugins` folder + +```bash +make install +``` + +Update or add the nf-schema plugin with the installed version in your test pipeline + +```groovy title="nextflow.config" +plugins { + id 'nf-schema@x.y.z' +} +``` + +## Launch it with a local version of Nextflow Clone the Nextflow repo into a sibling directory diff --git a/docs/nextflow_schema/nextflow_schema_specification.md b/docs/nextflow_schema/nextflow_schema_specification.md index 11a9486..7cfcf9a 100644 --- a/docs/nextflow_schema/nextflow_schema_specification.md +++ b/docs/nextflow_schema/nextflow_schema_specification.md @@ -82,9 +82,7 @@ However, they will be displayed as ungrouped in tools working off the schema. ## Nested parameters -!!! warning "Warning (TLDR;)" - - Although the JSON Schema allows schema objects (eg.` params.foo.bar = "baz"`) or arrays, this is not supported by this plugin. +!!! example "New feature in v2.1.0" Nextflow config allows parameters to be nested as objects, for example: @@ -102,12 +100,25 @@ or on the CLI: nextflow run --foo.bar "baz" ``` -But - the current implementations of the Nextflow _schema_ do not (for now). +Nested parameters can be specified in the schema by adding a `properties` keyword to the root parameters: -This was done as a conscious decision when the code was first written, to try to reduce complexity. +```json +{ + "type": "object", + "properties": { + "nested": { // Annotation for the --nested parameter + "type": "object", // Parameters that contain subparameters need to have the "object" type + "properties": { // Add other parameters in here + "deep": { // Annotation for the --nested.deep parameter + "type": "string" + } + } + }, + } +} +``` -It would be great to implement this at some point - there is a GitHub issue to track the feature request here: -[`nf-core/tools#1554`](https://github.com/nf-core/tools/issues/1554). Contributions welcome! +There is no limit to how deeply nested parameters can be. Mind however that deeply nested parameters are not that user friendly and will create some very ugly help messages. It's adviced to not go deeper than two levels of nesting, but it's entirely possible to go deeper. ## Required parameters