MannLabs/alphapept

AlphaPept CLI process hangs on error waiting for user input

Closed this issue · 3 comments

Is your feature request related to a problem? Please describe.
When run as a CLI process - if an error is encountered and the run fails - AlphaPept hangs waiting for user input.
This is probably done to let the user see the error. However, it makes automated monitoring of the CLI process more difficult. E.g. any automated pipeline that runs multiple AP instances via the CLI has to parse the standard output of the process in order to see if an error has been encountered (there is no error info in the log file and the process keeps hanging).

Describe the solution you'd like
A better solution would be to:

  • Write the error to the log file and STDERR
  • Fail the CLI process after the error has been encountered and handled

Describe alternatives you've considered

  • At the moment we rely on parsing STDOUT of the CLI process and then killing it from an automated pipeline. This seems like a rather fragile solution.

Additional context

Screenshot of the issue: Screenshot 2022-05-18 at 14 59 54

Location of the input request in the code:

input("Press Enter to continue...")

Probably the most versatile solution would be to provide a --disable-manual-termination flag or something to keep things backwards compatible.

Like this idea. We also in any case need to add some error output to logs and STDERR.

Yes, sounds great. Could you create a PR for this?