broadinstitute/viral-ngs — pull request #15 by iljungr (2014-10-21 21:10:04+00:00)
Title: Irwin download script

Daniel,
As I was creating tools for the various remaining commands in taxon_filter, I realized it would be nice to have a subclass of DownloadPackage that downloads stuff that doesn't require any installation except possibly unpacking. In implementing this DownloadScript class, I found some of the behaviors of DownloadPackage to be inconvenient. I changed them, but want to run the changes by you.
- I want the script to end up in the same place whether it is zipped or not, so I added a line to unpack that copies from the download_dir to the unpack_dir for files that aren't zipped or tarred.
- I renamed unpack_dir to destination_dir since it is no longer always unpacked there.
- Given this behavior, I couldn't think of any reason anyone would want a download_dir other than tempfile.gettempdir(), so I removed that argument from DownloadPackage and always use the tempdir.
- I moved the call to unpack out of post_download and put it into download.
- Unrelated to the above changes, I renamed requireExecutability to require_executability to be more consistent with your argument naming.