diff --git a/README.md b/README.md index 2791d74..2182d77 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ or you can install the main branch of the repo by running: `pip install git+https://github.com/CirroBio/Cirro-client.git` +To enable [pipeline configuration](#configuring-a-pipeline) you need to install extras using: + +```bash +pip install cirro[nextflow] # just nextflow pipeline configuration support +pip install cirro[wdl] # just wdl pipeline configuraiton support +pip install cirro[nextflow,wdl] # both nextflow and wdl pipeline configuration support +``` + +**NOTE**: Configuring Nextflow pipelines also requires a local installation of [`nextflow`](https://www.nextflow.io/). + ## Authentication Upon first use, the Cirro client will ask you what Cirro instance to use and if you would like to save your login information. @@ -87,6 +97,28 @@ Options: --help Show this message and exit. ``` +#### Configuring a pipeline +```bash +Usage: cirro create-pipeline-config [OPTIONS] + + Create pipeline configuration files + +Options: + -p, --pipeline-dir DIRECTORY Directory containing the pipeline definition + files (e.g., WDL or Nextflow) [default: .] + -e, --entrypoint TEXT Entrypoint WDL file (optional, if not + specified, the first WDL file found will be + used). Ignored for Nextflow pipelines. + -o, --output-dir TEXT Directory to store the generated configuration + files [default: .cirro] + -i, --interactive Gather arguments interactively + --help Show this message and exit. +``` + +It is highly recommended that: +- Nextflow pipelines utilize a [`nextflow_schema.json`](https://nextflow-io.github.io/nf-schema/latest/nextflow_schema/nextflow_schema_specification/) file. (If your pipeline originates from [NF-Core](https://nf-co.re/), this should already be the case.) +- WDL pipelines are defined in WDL v1.0 or higher and explicitly define an `input` section in the root-level workflow. + ### Interactive Commands When running a command, you can specify the `--interactive` flag to gather the command arguments interactively. diff --git a/cirro/cli/cli.py b/cirro/cli/cli.py index 29049c9..931e0b0 100644 --- a/cirro/cli/cli.py +++ b/cirro/cli/cli.py @@ -97,9 +97,8 @@ def configure(): run_configure() -@run.command(help='Create pipeline configuration files', no_args_is_help=True) +@run.command(help='Create pipeline configuration files') @click.option('-p', '--pipeline-dir', - required=True, metavar='DIRECTORY', help='Directory containing the pipeline definition files (e.g., WDL or Nextflow)', default='.', @@ -110,7 +109,7 @@ def configure(): ' Ignored for Nextflow pipelines.'), default='main.wdl') @click.option('-o', '--output-dir', - help='Directory to store the generated configuration files (default: current directory)', + help='Directory to store the generated configuration files', default='.cirro', show_default=True) @click.option('-i', '--interactive',