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

Improve error handling when files don't exist, e.g. in engine run #3

Open
dacb opened this issue Sep 21, 2018 · 4 comments
Open

Improve error handling when files don't exist, e.g. in engine run #3

dacb opened this issue Sep 21, 2018 · 4 comments
Assignees

Comments

@dacb
Copy link
Contributor

dacb commented Sep 21, 2018

In an environment without some of the paths listed in the config, e.g. /work/software directory, engine run will throw an error that should probably be caught and handled. E.g.,

(barrelseq) [dacb@D-10-19-48-52 ~/work/barrelseq]$ ./shim.py engine run --config-file /tmp/mytoy/config.yaml 
config file validation succeeded
CompletedProcess(args='/work/software/samtools/bin/samtools faidx /tmp/mytoy/data/reference.fasta', returncode=127, stderr=b'/bin/sh: /work/software/samtools/bin/samtools: No such file or directory\n')
Traceback (most recent call last):
  File "./shim.py", line 10, in <module>
    barrelseq.command_line.main()
  File "/Users/dacb/work/barrelseq/barrelseq/command_line.py", line 545, in main
    args.func(args)
  File "/Users/dacb/work/barrelseq/barrelseq/engine/run.py", line 116, in run
    if len(step) < args.processes:
TypeError: '<' not supported between instances of 'int' and 'NoneType'

This maybe part of a larger question about where and when these options should be validated. Probably in barrelseq/config.py:validate?

@dacb dacb self-assigned this Sep 21, 2018
@dacb
Copy link
Contributor Author

dacb commented Sep 21, 2018

Handled by 56bf942#diff-887fdaa62ac183543d9080bb224bc9de

Does not currently check if executables have the +x bit set.

@dacb
Copy link
Contributor Author

dacb commented Sep 21, 2018 via email

@mpesesky
Copy link
Collaborator

I put that in the wrong place, but since we're talking about it – I was thinking content. We could avoid it and just pass along the errors from the constituent programs as they run into format issues.

@dacb
Copy link
Contributor Author

dacb commented Sep 21, 2018

Can we leverage biopython for this vs reinventing our own validators?

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