looper icon indicating copy to clipboard operation
looper copied to clipboard

Better Error Messages (pipestat implementation)

Open donaldcampbelljr opened this issue 1 year ago • 1 comments

Related to: https://github.com/pepkit/looper/issues/392 https://github.com/pepkit/looper/issues/397

In my attempt to replicate #392, I noticed that, when using a looper config file for pipestat, if the pipestat initialization fails, Looper will raise an exception telling the user that they must configure pipestat to use the desired command.

However, Looper doesn't tell the user why pipestat initialization failed.

Example - Say I give looper an incorrect config file:

pep_config: ./project/project_config.yaml
output_dir: ./results
pipeline_interfaces:
  sample:  null     <----Problem is here
pipestat:
  results_file_path: results.yaml

Running command: looper check --looper-config .looper_pipestat.yaml

I see this:

Traceback (most recent call last):
  File "/home/drc/GITHUB/looper/master/looper/venv/bin/looper", line 8, in <module>
    sys.exit(main())
  File "/home/drc/GITHUB/looper/master/looper/venv/lib/python3.10/site-packages/looper/cli_looper.py", 
line 742, in main
    raise PipestatConfigurationException("check")
looper.exceptions.PipestatConfigurationException: Pipestat must be configured for command check

It would be better to tell the user why pipestat configuration failed.

donaldcampbelljr avatar Oct 24 '23 13:10 donaldcampbelljr