Skip to content

Conversation

@froggleston
Copy link
Contributor

@froggleston froggleston commented May 11, 2018

I haven't implemented the "queue" or "file" handlers yet, but here's a basic implementation of passing a handler function to those functions that would have otherwise just printed to stdout. Previously, especially for aspera transfers, the output is swallowed and can't be hoovered up by a process that watches stdout, so progress can't be monitored in any situation other than running the scripts on the command line. I've implemented code on the assumption that no handler will be provided, so the aspera and ftp output will go to stdout. More canned handlers could be added in future, or users can supply their own handlers.

For example, in a Django app, the aspera progress output wasn't discoverable by a websocket. Now, pexpect is used to gather up the output produced by aspera at each tick, and can be outputted to stdout as text or a JSON fragment that can be used in a webapp.

It could do with a bit more work, but I hope it's useful!

froggleston and others added 24 commits August 31, 2017 13:55
Fix format check for sequence data
Improved checks for Aspera files and binary
Handle known Python 3 Mac installation problem impacting HTTPS URLs
Don't re-download run/analysis file if exists (with MD5 check)
Replace (rather than append to) sequence files if they exist
Download WGS set if WGS-only assembly or assembly contains WGS scaffolds (even without WGS flag)
Added flag to extract WGS scaffolds from WGS file into wgs_scaffolds file
Added some progress information to enaDataGet assembly fetch
Issue 35 fix
Removal of wrongly committed files
@nicsilvester
Copy link
Contributor

I've had a quick look at this and can't authorised the pull request at this time due to the use of pexpect. We made a conscious decision to use only libraries in a standard python installation. This may change with future deployment strategies that have better dependency management, but for now it's a key feature that people can install python and then use these scripts out of the box without worrying about anything else.

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

Successfully merging this pull request may close these issues.

4 participants