예제 #1
0
    def test_submit_EBI_step_2_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1), True)
        pid = ppd.id

        with self.assertRaises(ComputeError):
            submit_EBI(pid, 'VALIDATE', True)

        rmtree(join(self.base_fp, '%d_ebi_submission' % pid), True)
예제 #2
0
파일: test_commands.py 프로젝트: jlab/qiita
    def test_submit_EBI_step_2_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1), True)
        pid = ppd.id

        with self.assertRaises(ComputeError):
            submit_EBI(pid, 'VALIDATE', True)

        rmtree(join(self.base_fp, '%d_ebi_submission' % pid), True)
예제 #3
0
    def test_full_submission(self):
        artifact = self.generate_new_study_with_preprocessed_data()
        self.assertEqual(artifact.study.ebi_submission_status, 'not submitted')
        aid = artifact.id
        submit_EBI(aid, 'VALIDATE', True, test=True)
        self.assertEqual(artifact.study.ebi_submission_status, 'submitted')

        rmtree(join(self.base_fp, '%d_ebi_submission' % aid), True)
예제 #4
0
    def test_full_submission(self):
        artifact = self.generate_new_study_with_preprocessed_data()
        self.assertEqual(
            artifact.study.ebi_submission_status, 'not submitted')
        aid = artifact.id
        submit_EBI(aid, 'VALIDATE', True, test=True)
        self.assertEqual(artifact.study.ebi_submission_status, 'submitted')

        rmtree(join(self.base_fp, '%d_ebi_submission' % aid), True)
예제 #5
0
    def test_max_ebiena_curl_error(self):
        artifact = self.generate_new_study_with_preprocessed_data()
        self.assertEqual(artifact.study.ebi_submission_status, 'not submitted')
        aid = artifact.id
        with self.assertRaises(ComputeError) as error:
            submit_EBI(aid, 'VALIDATE', True, test_size=True)
        error = str(error.exception)
        self.assertIn('is too large. Before cleaning:', error)

        rmtree(join(self.base_fp, '%d_ebi_submission' % aid), True)
예제 #6
0
    def test_submit_EBI_parse_EBI_reply_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1))

        with self.assertRaises(ComputeError) as error:
            submit_EBI(ppd.id, 'VALIDATE', True)
        error = str(error.exception)
        self.assertIn('EBI Submission failed! Log id:', error)
        self.assertIn('The EBI submission failed:', error)
        self.assertIn('Failed to validate run xml, error: Expected element',
                      error)
예제 #7
0
파일: test_commands.py 프로젝트: jlab/qiita
    def test_submit_EBI_parse_EBI_reply_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1))
        pid = ppd.id

        with self.assertRaises(ComputeError) as error:
            submit_EBI(pid, 'VALIDATE', True)
        error = str(error.exception)
        self.assertIn('EBI Submission failed! Log id:', error)
        self.assertIn('The EBI submission failed:', error)

        rmtree(join(self.base_fp, '%d_ebi_submission' % pid), True)
예제 #8
0
    def test_submit_EBI_parse_EBI_reply_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1))
        pid = ppd.id

        with self.assertRaises(ComputeError) as error:
            submit_EBI(pid, 'VALIDATE', True)
        error = str(error.exception)
        self.assertIn('EBI Submission failed! Log id:', error)
        self.assertIn('The EBI submission failed:', error)

        rmtree(join(self.base_fp, '%d_ebi_submission' % pid), True)
예제 #9
0
    def test_max_ebiena_curl_error(self):
        artifact = self.generate_new_study_with_preprocessed_data()
        self.assertEqual(
            artifact.study.ebi_submission_status, 'not submitted')
        aid = artifact.id
        with self.assertRaises(ComputeError) as error:
            submit_EBI(aid, 'VALIDATE', True, test_size=True)
        error = str(error.exception)
        self.assertIn('is too large. Before cleaning:', error)

        rmtree(join(self.base_fp, '%d_ebi_submission' % aid), True)
예제 #10
0
def submit_to_EBI(job):
    """Submit a study to EBI

    Parameters
    ----------
    job : qiita_db.processing_job.ProcessingJob
        The processing job performing the task
    """
    with qdb.sql_connection.TRN:
        param_vals = job.parameters.values
        artifact_id = int(param_vals['artifact'])
        submission_type = param_vals['submission_type']
        submit_EBI(artifact_id, submission_type, True)
        job._set_status('success')
예제 #11
0
def submit_to_EBI(job):
    """Submit a study to EBI

    Parameters
    ----------
    job : qiita_db.processing_job.ProcessingJob
        The processing job performing the task
    """
    with qdb.sql_connection.TRN:
        param_vals = job.parameters.values
        artifact_id = int(param_vals['artifact'])
        submission_type = param_vals['submission_type']
        submit_EBI(artifact_id, submission_type, True)
        job._set_status('success')
예제 #12
0
def submit_to_ebi(preprocessed_data_id, submission_type):
    """Submit a study to EBI"""
    study_acc, submission_acc = submit_EBI(preprocessed_data_id,
                                           submission_type,
                                           True)

    return study_acc, submission_acc
예제 #13
0
def submit_to_EBI(job):
    """Submit a study to EBI

    Parameters
    ----------
    job : qiita_db.processing_job.ProcessingJob
        The processing job performing the task
    """
    with qdb.sql_connection.TRN:
        param_vals = job.parameters.values
        artifact_id = int(param_vals['artifact'])
        submission_type = param_vals['submission_type']
        artifact = qdb.artifact.Artifact(artifact_id)

        for info in artifact.study._ebi_submission_jobs():
            jid, aid, js, cbste, era = info
            if js in ('running', 'queued') and jid != job.id:
                error_msg = ("Cannot perform parallel EBI submission for "
                             "the same study. Current job running: %s" % js)
                raise EBISubmissionError(error_msg)
        submit_EBI(artifact_id, submission_type, True)
        job._set_status('success')
예제 #14
0
def submit_to_EBI(job):
    """Submit a study to EBI

    Parameters
    ----------
    job : qiita_db.processing_job.ProcessingJob
        The processing job performing the task
    """
    with qdb.sql_connection.TRN:
        param_vals = job.parameters.values
        artifact_id = int(param_vals['artifact'])
        submission_type = param_vals['submission_type']
        artifact = qdb.artifact.Artifact(artifact_id)

        for info in artifact.study._ebi_submission_jobs():
            jid, aid, js, cbste, era = info
            if js in ('running', 'queued') and jid != job.id:
                error_msg = ("Cannot perform parallel EBI submission for "
                             "the same study. Current job running: %s" % js)
                raise EBISubmissionError(error_msg)
        submit_EBI(artifact_id, submission_type, True)
        job._set_status('success')
예제 #15
0
 def test_full_submission(self):
     artifact = self.generate_new_study_with_preprocessed_data()
     self.assertEqual(artifact.study.ebi_submission_status, 'not submitted')
     submit_EBI(artifact.id, 'VALIDATE', True, test=True)
     self.assertEqual(artifact.study.ebi_submission_status, 'submitted')
예제 #16
0
    def test_submit_EBI_step_2_failure(self):
        ppd = self.write_demux_files(PrepTemplate(1), False)

        with self.assertRaises(EBISubmissionError):
            submit_EBI(ppd.id, 'VALIDATE', True)
예제 #17
0
 def test_submit_EBI_parse_EBI_reply_failure(self):
     ppd = self.write_demux_files(PrepTemplate(1))
     with self.assertRaises(ComputeError):
         submit_EBI(ppd.id, 'ADD', True)
예제 #18
0
 def test_submit_EBI_parse_EBI_reply_failure(self):
     ppd = self.write_demux_files(PrepTemplate(1))
     with self.assertRaises(ComputeError):
         submit_EBI(ppd.id, 'ADD', True)