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

semi colons in preprocess commands #162

Open
IanSudbery opened this issue Jul 15, 2024 · 1 comment
Open

semi colons in preprocess commands #162

IanSudbery opened this issue Jul 15, 2024 · 1 comment

Comments

@IanSudbery
Copy link
Contributor

IanSudbery commented Jul 15, 2024

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?

@sebastian-luna-valero
Copy link
Member

Not sure why, but I would also replace ; with && to chain commands and remove those asserts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants