seqeralabs / seqera-kit

Python implementation and field-tool for automated pipeline launching through Tower CLI (beta)
Apache License 2.0
25 stars 6 forks source link

[Bug] seqerakit --info does not respect the --cli flag #151

Closed adamrtalbot closed 3 months ago

adamrtalbot commented 4 months ago

Running seqerakit --info does not seem to respect the --cli or --dryrun flag. You can see it bypass the options here: https://github.com/seqeralabs/seqera-kit/blob/60efe638b7649cdd3fe9ea144b56624707fac334/seqerakit/cli.py#L148-L152

> seqerakit --cli="hello-world" --info
DEBUG:root: Running command: tw info
Details
    -------------------------+----------------------
     Tower API endpoint      | https://api.tower.nf 
     Tower API version       | 1.25.0               
     Tower version           | 24.1.0-cycle17       
     CLI version             | 0.9.2 (39a2ec6)      
     CLI minimum API version | 1.15                 
     Authenticated user      | adamtalbot           

    System health status
    ---------------------------------------+----
     Remote API server connection check    | OK 
     Tower API version check               | OK 
     Authentication API credential's token | OK

Whereas it does when running a different CLI command:

> seqerakit --dryrun --cli="hello-world" ./pipelines/hello-world.yml
DEBUG:root:DRYRUN: Running command tw hello-world pipelines add --name nf-hello-world-$PIPELINE_NAME_SUFFIX --workspace $SEQERA_ORGANIZATION_NAME/$SEQERA_WORKSPACE_NAME --description 'Classic Hello World script in Nextflow language.' --compute-env $SEQERA_COMPUTE_ENV_NAME --revision master https://github.com/nextflow-io/hello

(note the hello-world between tw and the pipeline subcommand).

ejseqera commented 3 months ago

Fixed in #156