Ejemplo n.º 1
0
 def test_sanity(self):
     d = get_temp_dir("resolved-tool-contract")
     tc = load_tool_contract_from(get_data_file(self.FILE_NAME))
     rtc = resolve_gather_tool_contract(tc, self.INPUT_FILES, d, d, self.MAX_NPROC, self.TOOL_OPTIONS, self.CHUNK_KEY)
     self.assertIsInstance(rtc, ResolvedToolContract)
     self.assertIsInstance(rtc.task, ResolvedGatherToolContractTask)
     self.assertEqual(rtc.task.chunk_key, self.CHUNK_KEY)
Ejemplo n.º 2
0
 def test_sanity(self):
     d = get_temp_dir("resolved-tool-contract")
     tc = load_tool_contract_from(get_tool_contract(self.FILE_NAME))
     rtc = resolve_gather_tool_contract(tc, self.INPUT_FILES, d, d, self.MAX_NPROC, self.TOOL_OPTIONS, self.CHUNK_KEY, False)
     self.assertIsInstance(rtc, ResolvedToolContract)
     self.assertIsInstance(rtc.task, ResolvedGatherToolContractTask)
     self.assertEqual(rtc.task.chunk_key, self.CHUNK_KEY)
     self.assertEqual(rtc.task.is_distributed, False)
Ejemplo n.º 3
0
def static_gather_meta_task_to_rtc(static_meta_task, task, task_options, task_dir, tmp_dir, max_nproc, chunk_key, is_distributed):

    rtc = resolve_gather_tool_contract(static_meta_task.tool_contract, task.input_files, task_dir, tmp_dir, max_nproc, task_options, chunk_key, is_distributed)
    # See the above comment for this
    rtc.task.output_files = task.output_files
    rtc.task.nproc = task.nproc
    task.resources = task.resources

    return rtc
Ejemplo n.º 4
0
def static_gather_meta_task_to_rtc(static_meta_task, task, task_options, task_dir, tmp_dir, max_nproc, chunk_key):

    rtc = resolve_gather_tool_contract(static_meta_task.tool_contract, task.input_files, task_dir, tmp_dir, max_nproc, task_options, chunk_key)
    # See the above comment for this
    rtc.task.output_files = task.output_files
    rtc.task.is_distributed = static_meta_task.is_distributed
    rtc.task.nproc = task.nproc
    task.resources = task.resources

    return rtc
Ejemplo n.º 5
0
 def _to_rtc(self, tc, output_dir, tmp_dir):
     return resolve_gather_tool_contract(tc, self.INPUT_FILES, output_dir,
                                         tmp_dir, self.MAX_NPROC,
                                         self.TASK_OPTIONS, self.CHUNK_KEY,
                                         self.IS_DISTRIBUTED)
Ejemplo n.º 6
0
 def _to_rtc(self, tc, output_dir, tmp_dir):
     return resolve_gather_tool_contract(tc, self.INPUT_FILES, output_dir, tmp_dir, self.MAX_NPROC, self.TASK_OPTIONS, self.CHUNK_KEY)