discoproject/disco — pull request #494 by dinedal (2014-04-19 23:18:28+00:00)
Title: JobPack creation requires a version in the constructor

I'm just starting out with this codebase, so please forgive my attempt at repairs if they are not in-line with your expectations. I'm also rather new to python. Happy to make any changes needed to get the fix merged.

It appears that `develop` adds a new type of worker class, the Pipeline worker, that requires a new version of JobPack. The JobPack class was updated to take a version in the constructor, however this update was not applied to the CLI `disco job` command. While just setting `JOBPACK_VERSION1` does suffice for a fix, I did want to keep the option of creating the new kind of worker available to the command line.

This code attempts to "guess" the JobPack version based on the arguments provided. Another way would be to accept an explicit version, or to always use the latest, or something else.