Skip to content

semi colons in preprocess commands #162

@IanSudbery

Description

@IanSudbery

cgatpipelines.tasks.preprocess still uses semi-colons to seperate out its commands. This has not been suitable for some time, as when commands are seperated by ;, if one errors, then:

  1. The subsequent commands will run anyway
  2. I far as I can tell, only the stderr of the last command in the chain returned.

We used to have checkpoint; to run between commands for this reason, but that has been retired, long ago, in favour of seperating commands by && instead of ; checkpoint;.

Except, it seems in cgatpipeline.tasks.preprocess.

I started changing over the statements to use ' && '.join () rather than ';'.join, but it seems that there are three lines in the MasterProcessor class that actively check for ; at the end of statement, which fails when things are joined by &&. Any idea what the purpose of this is?

https://github.com/cgat-developers/cgat-flow/blob/7ae2e893a41f952c07f35b5cebb4c3c408d8477b/cgatpipelines/tasks/preprocess.py#L290C9-L292C47

Any reason I shouldn't just remove them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions