From 10d951612dbb0598ded0b6c02dd6241f84f648d4 Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Wed, 16 Oct 2024 11:59:43 +0200 Subject: [PATCH] Fix problematic json schemas --- assets/schema_input.json | 35 ++++++++++++++----- nextflow_schema.json | 18 +++++++--- .../tests/nextflow_schema.json | 17 ++++++--- 3 files changed, 53 insertions(+), 17 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index b5ff417..775aa5f 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/nf-core/tfactivity/master/assets/schema_input.json", "title": "nf-core/tfactivity pipeline - params.input schema", "description": "Schema for the file provided with params.input", @@ -11,19 +11,25 @@ "type": "string", "pattern": "^\\S+$", "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"] + "meta": [ + "id" + ] }, "condition": { "type": "string", "pattern": "^\\S+$", "errorMessage": "Condition name must be provided and cannot contain spaces", - "meta": ["condition"] + "meta": [ + "condition" + ] }, "assay": { "type": "string", "pattern": "^\\S+$", "errorMessage": "Assay name must be provided and cannot contain spaces", - "meta": ["assay"] + "meta": [ + "assay" + ] }, "peak_file": { "type": "string", @@ -36,22 +42,33 @@ "type": "boolean", "default": true, "errorMessage": "footprinting must be a boolean value", - "meta": ["footprinting"] + "meta": [ + "footprinting" + ] }, "include_original": { "type": "boolean", "default": true, "errorMessage": "include_original must be a boolean value", - "meta": ["include_original"] + "meta": [ + "include_original" + ] }, "max_peak_gap": { "type": "integer", "default": 500, "minimum": 0, "errorMessage": "max_peak_gap must be a positive integer", - "meta": ["max_peak_gap"] + "meta": [ + "max_peak_gap" + ] } }, - "required": ["sample", "condition", "assay", "peak_file"] + "required": [ + "sample", + "condition", + "assay", + "peak_file" + ] } -} +} \ No newline at end of file diff --git a/nextflow_schema.json b/nextflow_schema.json index a0ee139..4f22c44 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/nf-core/tfactivity/master/nextflow_schema.json", "title": "nf-core/tfactivity pipeline parameters", "description": "TBD", @@ -10,7 +10,10 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir"], + "required": [ + "input", + "outdir" + ], "properties": { "input": { "type": "string", @@ -378,7 +381,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ], "hidden": true }, "email_on_fail": { @@ -468,4 +478,4 @@ "$ref": "#/$defs/generic_options" } ] -} +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json index 331e0d2..927b4e7 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json", "title": ". pipeline parameters", "description": "", @@ -10,7 +10,9 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["outdir"], + "required": [ + "outdir" + ], "properties": { "validate_params": { "type": "boolean", @@ -74,7 +76,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ], "hidden": true }, "monochrome_logs": { @@ -93,4 +102,4 @@ "$ref": "#/$defs/generic_options" } ] -} +} \ No newline at end of file