def post(self): analysis = Analysis(int(self.get_argument('analysis-id'))) # set to third step since this page is third step in workflow analysis.step = SELECT_COMMANDS data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def get(self): analysis_id = int(self.get_argument('aid')) analysis = Analysis(analysis_id) check_analysis_access(self.current_user, analysis) data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def get(self): analysis_id = int(self.get_argument('aid')) analysis = Analysis(analysis_id) check_analysis_access(self.current_user, analysis) data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def post(self): analysis = Analysis(int(self.get_argument('analysis-id'))) # set to third step since this page is third step in workflow analysis.step = SELECT_COMMANDS data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def post(self): name = self.get_argument('name') desc = self.get_argument('description') analysis = Analysis.create(self.current_user, name, desc, from_default=True) # set to third step since this page is third step in workflow analysis.step = SELECT_COMMANDS data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def post(self): name = self.get_argument('name') desc = self.get_argument('description') analysis = Analysis.create(self.current_user, name, desc, from_default=True) # set to third step since this page is third step in workflow analysis.step = SELECT_COMMANDS data_types = analysis.data_types commands = Command.get_commands_by_datatype() self.render('select_commands.html', commands=commands, data_types=data_types, aid=analysis.id)
def test_get_commands_by_datatype(self): obs = Command.get_commands_by_datatype() self.assertEqual(obs, self.all_comms) obs = Command.get_commands_by_datatype(["16S", "Metabolomic"]) exp = {k: self.all_comms[k] for k in ('16S', 'Metabolomic')} self.assertEqual(obs, exp)