Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/nextflow_schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/{{ name }}/{{ default_branch }}/nextflow_schema.json",
"title": "{{ name }} pipeline parameters",
"title": "{{ name }}",
"description": "{{ description }}",
"type": "object",
"$defs": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions nf_core/pipelines/lint/schema_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def schema_lint(self):

* ``$schema``: ``https://json-schema.org/draft-07/schema`` or ``https://json-schema.org/draft/2020-12/schema``
* ``$id``: URL to the raw schema file, eg. ``https://raw.githubusercontent.com/YOURPIPELINE/master/nextflow_schema.json``
* ``title``: ``YOURPIPELINE pipeline parameters``
* ``title``: ``YOURPIPELINE``
* ``description``: The pipeline config ``manifest.description``
* That the ``input`` property is defined and has a mimetype. A list of common mimetypes can be found `here <https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types>`_.

Expand All @@ -42,7 +42,7 @@ def schema_lint(self):
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/YOURPIPELINE/master/nextflow_schema.json",
"title": "YOURPIPELINE pipeline parameters",
"title": "YOURPIPELINE",
"description": "This pipeline is for testing",
"properties": {
"first_param": { "type": "string" }
Expand All @@ -64,7 +64,7 @@ def schema_lint(self):
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/YOURPIPELINE/master/nextflow_schema.json",
"title": "YOURPIPELINE pipeline parameters",
"title": "YOURPIPELINE",
"description": "This pipeline is for testing",
"properties": {
"first_param": { "type": "string" }
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipelines/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def validate_schema_title_description(self, schema=None):
f"Schema `$id` should be `{id_attr}` or {id_attr.replace('/main/', '/master/')}. \n Found `{self.schema['$id']}`"
)

title_attr = "{} pipeline parameters".format(self.pipeline_manifest["name"].strip("\"'"))
title_attr = self.pipeline_manifest["name"].strip("\"'")
if self.schema["title"] != title_attr:
raise AssertionError(f"Schema `title` should be `{title_attr}`\n Found: `{self.schema['title']}`")

Expand Down
4 changes: 2 additions & 2 deletions tests/pipelines/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ def test_make_skeleton_schema(self):
self.schema_obj.pipeline_manifest["description"] = "Test pipeline"
self.schema_obj.make_skeleton_schema()
self.schema_obj.validate_schema(self.schema_obj.schema)
assert self.schema_obj.schema["title"] == "nf-core/test pipeline parameters"
assert self.schema_obj.schema["title"] == "nf-core/test"

def test_make_skeleton_schema_absent_name(self):
"""Test making a new schema skeleton"""
self.schema_obj.schema_filename = self.template_schema
self.schema_obj.pipeline_manifest["description"] = "Test pipeline"
self.schema_obj.make_skeleton_schema()
self.schema_obj.validate_schema(self.schema_obj.schema)
assert self.schema_obj.schema["title"] == "wf pipeline parameters"
assert self.schema_obj.schema["title"] == "wf"

def test_get_wf_params(self):
"""Test getting the workflow parameters from a pipeline"""
Expand Down