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

Implement a progress output handler for ftp and aspera downloads #36

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

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