Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require an argument for nf-core schema lint #2225

Merged
merged 3 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Don't require an argument for nf-core schema lint
  • Loading branch information
sersorrel committed Mar 29, 2023
commit 790a9b86de92de4703bc65a33ce9ee9f97b53b2f
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,13 @@ It's important to change the default value of a parameter in the `nextflow.confi
The pipeline schema is linted as part of the main pipeline `nf-core lint` command,
however sometimes it can be useful to quickly check the syntax of the JSONSchema without running a full lint run.

Usage is `nf-core schema lint <schema>`, eg:
Usage is `nf-core schema lint <schema>` (defaulting to `nextflow_schema.json`), eg:

<!-- RICH-CODEX
working_dir: tmp/nf-core-nextbigthing
-->

![`nf-core schema lint nextflow_schema.json`](docs/images/nf-core-schema-lint.svg)
![`nf-core schema lint`](docs/images/nf-core-schema-lint.svg)

## Bumping a pipeline version number

Expand Down
4 changes: 3 additions & 1 deletion nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ def build(dir, no_prompts, web_only, url):

# nf-core schema lint
@schema.command()
@click.argument("schema_path", type=click.Path(exists=True), required=True, metavar="<pipeline schema>")
@click.argument("schema_path", type=click.Path(exists=True), default="nextflow_schema.json", metavar="<pipeline schema>")
def lint(schema_path):
"""
Check that a given pipeline schema is valid.
Expand All @@ -1408,6 +1408,8 @@ def lint(schema_path):

This function runs as part of the nf-core lint command, this is a convenience
command that does just the schema linting nice and quickly.

If no schema path is provided, "nextflow_schema.json" will be used (if it exists).
"""
schema_obj = nf_core.schema.PipelineSchema()
try:
Expand Down