Remove hardcode commands

This now dynamically populates the commands available for each data type in qiita_pet.

It also adds functionality to the Command object to pull out a dictionary of commands keyed to the datatype they are for.
Databases are generally unordered
On Jul 2, 2014 5:26 PM, "Joshua Shorenstein" <notifications@github.com>
wrote:

> In qiita_db/job.py:
>
> > @@ -197,6 +203,26 @@ def options(self):
> >              opts[k] = join_f("%s_%s_%s" % (self._id, db_comm[0], k.strip("-")))
> >          return opts
> >
> > +    @options.setter
> > +    def options(self, opts):
> > +        """ Sets the options for the job
> > +
> > +        Parameters
> > +        ----------
> > +        opts: dict
> > +            The options for the command in format {option: value}
> > +        """
> > +        # make sure job is editable
> > +        self._lock_job()
> > +
> > +        conn_handler = SQLConnectionHandler()
> > +        # JSON the options dictionary
> > +        opts_json = dumps(opts, sort_keys=True, separators=(',', ':'))
>
> Currently it is the only consumer of this, but storing the options in
> sorted order on the database should make any type of string-search on json
> easier.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biocore/qiita/pull/184/files#r14490195>.
>