You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fork the pipeline to your user account, if you have not done so before (Make sure you deselect Copy the master branch only)
Go to the dev branch and sync the upstream changes (Sync fork -> Update branch)
Create a branch called json-schema-improvements with the dev branch as base in the fork
Open the json-schema-improvements branch of the fork either locally (git clone) or online (via Github Codespaces, GitPod...)
Open the nextflow_schema.json file
Check that the value in "$schema" is "https://json-schema.org/draft/2020-12/schema". The pipeline should be updated to nf-schema if this is not the case. See the migration guide on how to do this
Check the schema for insufficient validation keywords and error messages. See the guide below for more information on this
Do the same thing for assets/schema_input.json
Run nextflow run main.nf -profile test,docker --outdir results -stub to check for any failures in validation with the basic test setup
Update the changelog of the pipeline
Push all changes to your fork (if you have not done so yet)
Open a pull request to the dev branch of the nf-core repository
Request a review in #hackathon-mar-2025-json-schema-improvements or in the pipeline channel (e.g. #sarek for nf-core/sarek) and set the issue status to Ready to review (PR: )
Wait for approval and merge the pull request once everything works again
Set the issue status to Done
Checking the validation keywords
This section contains options for each type of parameter (the type can be found in the "type" keyword)
IMPORTANT: If an errorMessage is present, please update it so that it covers all possible validation errors for the type (the more it covers the better)
ALSO IMPORTANT: Check that the help_text and description keywords are clear enough
default: The default value, make sure this is filled in if the default value is not null, "" or false
required: A list of required parameters for each section
string
minLength and maxLength: specify the minimal and/or maximum length of the string value
pattern: A regular expression the string value has to adhere to
format: This is mainly used to define if a value should be a "file-path", "directory-path", "path" or "file-path-pattern". Other formats are allowed that are part of the official JSON schema specs, but are rarely used in Nextflow JSON schemas
exists: Make sure this is true if the file should exist (Be careful, some times files or directories do not have to exist for a pipeline to succesfully start e.g. --outdir)
schema: The relative path from the root of the pipeline to another schema to validate the file specified by that value. Please also check this schema very carefully
number and integer
multipleOf: The value needs to be a multiple of this number
WARNING: This type is not supported in nextflow_schema.json, but is supported in other schemas
uniqueEntries: A list of keys that need to be unique in the objects present in this array
uniqueItems: Set to true if you want each entry in the array to be unique
object
WARNING: This type is not supported in nextflow_schema.json (apart from the root "type" keyword of the file and of each section in "$defs"), but is supported in other schemas
This type can be very complex and will not be used in 99% of the cases. You can take a look at the official object documentation or ask for help in #hackathon-mar-2025-json-schema-improvements if you need to check object types
The text was updated successfully, but these errors were encountered:
Copy the master branch only
)dev
branch and sync the upstream changes (Sync fork
->Update branch
)json-schema-improvements
with thedev
branch as base in the forkjson-schema-improvements
branch of the fork either locally (git clone
) or online (via Github Codespaces, GitPod...)nextflow_schema.json
file"$schema"
is"https://json-schema.org/draft/2020-12/schema"
. The pipeline should be updated to nf-schema if this is not the case. See the migration guide on how to do thisassets/schema_input.json
nextflow run main.nf -profile test,docker --outdir results -stub
to check for any failures in validation with the basic test setupdev
branch of the nf-core repositoryReady to review
(PR: )Done
Checking the validation keywords
This section contains options for each type of parameter (the type can be found in the
"type"
keyword)IMPORTANT: If an
errorMessage
is present, please update it so that it covers all possible validation errors for the type (the more it covers the better)ALSO IMPORTANT: Check that the
help_text
anddescription
keywords are clear enoughType-independent keywords
null
,""
orfalse
string
string
valuestring
value has to adhere to"file-path"
,"directory-path"
,"path"
or"file-path-pattern"
. Other formats are allowed that are part of the official JSON schema specs, but are rarely used in Nextflow JSON schemastrue
if the file should exist (Be careful, some times files or directories do not have to exist for a pipeline to succesfully start e.g.--outdir
)number
andinteger
boolean
The boolean type has no type-specific keywords
array
WARNING: This type is not supported in
nextflow_schema.json
, but is supported in other schemastrue
if you want each entry in the array to be uniqueobject
WARNING: This type is not supported in
nextflow_schema.json
(apart from the root"type"
keyword of the file and of each section in"$defs"
), but is supported in other schemasThis type can be very complex and will not be used in 99% of the cases. You can take a look at the official object documentation or ask for help in #hackathon-mar-2025-json-schema-improvements if you need to check
object
typesThe text was updated successfully, but these errors were encountered: