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

No project name was specified #3559

Open
nick-youngblut opened this issue Jan 18, 2023 · 9 comments · May be fixed by #3600
Open

No project name was specified #3559

nick-youngblut opened this issue Jan 18, 2023 · 9 comments · May be fixed by #3600
Assignees
Labels

Comments

@nick-youngblut
Copy link
Contributor

Bug report

If one runs nextflow run with -with-report or -with-trace (and provides a "main" nextflow workflow file as input, such as main.nf), then one gets the error:

No project name was specified

There is no info in https://www.nextflow.io/docs/latest/tracing.html that I can find on how to set the project name. I have tried to set the project name via:

manifest {
  name = 'my_project_name'
}

...but that still results in the issue.

Expected behavior and actual behavior

Clear information on how to set the project name when using -with-report or -with-trace.

Steps to reproduce the problem

Nextflow version: 22.10.4.5836

Installed Nextflow via bioconda

Run

nextflow run  -profile aws,docker -with-trace -with-report main.nf 

Config

manifest {
  name = 'my_project_name'
}

profiles {
    docker {
        docker.enabled         = true
        docker.sudo            = true
        docker.runOptions      = '-u \$(id -u):\$(id -g)'
        singularity.enabled    = false
        podman.enabled         = false
        shifter.enabled        = false
        charliecloud.enabled   = false
    }
    aws {
        process.executor   = 'awsbatch'
        process.queue      = 'my_process_queue'
    }
}

aws {
  batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
  accessKey = secrets.AWS_ACCESS_KEY_ID
  secretKey = secrets.AWS_SECRET_ACCESS_KEY
  region = secrets.AWS_DEFAULT_REGION
}

process {
    errorStrategy = 'retry'
    maxRetries    = 3
    maxErrors     = '-1'
}

Environment

  • Nextflow version: 22.10.4.5836
  • Java version: "17.0.3-internal" 2022-04-19
  • Operating system: macOS
  • Bash version: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

Maybe it would be useful to create a nextflow diagnose subcommand that lists all of these environment parameters?

@mribeirodantas
Copy link
Member

Hm.. If you place the main.nf right after run it works, but when it's at the end it doesn't. Yeah, definitely looks like a bug!

@bentsherman
Copy link
Member

bentsherman commented Jan 19, 2023

Looks like the run command just expects the project name to be the first argument:

void run() {
final scriptArgs = (args?.size()>1 ? args[1..-1] : []) as List<String>
final pipeline = stdin ? '-' : ( args ? args[0] : null )
if( !pipeline )
throw new AbortOperationException("No project name was specified")

@maxulysse
Copy link
Contributor

maxulysse commented Jan 19, 2023

also, using -with-report main.nf means that you want the pipeline to create the report main.nf.
cf https://www.nextflow.io/docs/latest/tracing.html#execution-report

@mribeirodantas
Copy link
Member

Good point, @maxulysse !

@bentsherman bentsherman added docs and removed bug labels Jan 20, 2023
@bentsherman
Copy link
Member

I think this is the expected behavior. Not just with Nextflow but with CLIs in general -- positional args must always come before named args. However, I noticed the docs are incorrect: https://nextflow.io/docs/latest/cli.html#run

$ nextflow run [options] [project]

@mribeirodantas can you correct the docs here? I would also check the entire CLI docs page to see if this error was made for other commands. And the CLI output in Nextflow.

@mribeirodantas
Copy link
Member

Sure! I saw the docs page yesterday and was wondering if this was really true. I will work on that.

@nick-youngblut
Copy link
Contributor Author

It would help to clarify in the nextflow run docs which parameters are boolean versus which require a >=1 argument:

    -with-charliecloud
       Enable process execution in a Charliecloud container runtime
    -with-conda
       Use the specified Conda environment package or file (must end with
       .yml|.yaml suffix)
    -with-dag
       Create pipeline DAG file
    -with-docker
       Enable process execution in a Docker container
    -N, -with-notification
       Send a notification email on workflow completion to the specified
       recipients
    -with-podman
       Enable process execution in a Podman container
    -with-report
       Create processes execution html report
    -with-singularity
       Enable process execution in a Singularity container
    -with-timeline
       Create processes execution timeline file
    -with-tower
       Monitor workflow execution with Seqera Tower service
    -with-trace
       Create processes execution tracing file
    -with-weblog
       Send workflow status messages via HTTP to target URL
    -without-conda
       Disable the use of Conda environments
    -without-docker
       Disable process execution with Docker
       Default: false
    -without-podman
       Disable process execution in a Podman container
    -w, -work-dir
       Directory where intermediate result files are stored

@bentsherman
Copy link
Member

I took another look here and it turns out I gave the wrong diagnosis. The problem is that some options like -with-report expect an argument but Nextflow will insert a default "-" if no argument is given. Unfortunately I don't think we can fix this with the current CLI.

We are working on a new CLI called nf (see #3595). I just tested it and I can do the following:

nf run --with-trace --with-report -- main.nf

The double dash allows you to separate positional arguments from optional arguments. But it doesn't seem to work with the current CLI. So I will tie this issue to the new CLI effort.

@bentsherman bentsherman removed the docs label Jul 5, 2023
@bentsherman bentsherman linked a pull request Jul 5, 2023 that will close this issue
6 tasks
Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants