예제 #1
0
    def setUp(self):
        self.pipeline = DummyPipeline()

        tmpout = tempfile.mkstemp('.txt', prefix='capsul_test_')
        os.close(tmpout[0])
        os.unlink(tmpout[1])

        # use a custom temporary soma-workflow dir to avoid concurrent
        # access problems
        tmpdb = tempfile.mkstemp('', prefix='soma_workflow')
        os.close(tmpdb[0])
        os.unlink(tmpdb[1])
        self.soma_workflow_temp_dir = tmpdb[1]
        os.mkdir(self.soma_workflow_temp_dir)
        swf_conf = '[%s]\nSOMA_WORKFLOW_DIR = %s\n' \
            % (socket.gethostname(), tmpdb[1])
        swconfig.Configuration.search_config_path \
            = staticmethod(lambda : StringIO.StringIO(swf_conf))

        self.output = tmpout[1]
        self.pipeline.input = '/tmp/file_in.nii'
        self.pipeline.output = self.output
        study_config = StudyConfig(modules=['SomaWorkflowConfig'])
        study_config.input_directory = '/tmp'
        study_config.somaworkflow_computing_resource = 'localhost'
        study_config.somaworkflow_computing_resources_config.localhost = {
            'transfer_paths': [],
        }
        self.study_config = study_config
예제 #2
0
 def setUp(self):
     study_config = StudyConfig() #modules=StudyConfig.default_modules \
                                #+ ['FomConfig'])
     self.pipeline = DummyPipeline()
     self.pipeline.set_study_config(study_config)
     self.tmpdir = tempfile.mkdtemp()
     self.pipeline.input = osp.join(self.tmpdir, 'file_in.nii')
     self.pipeline.output1 = osp.join(self.tmpdir, '/tmp/file_out1.nii')
     self.pipeline.output2 = osp.join(self.tmpdir, '/tmp/file_out2.nii')
     self.pipeline.output3 = osp.join(self.tmpdir, '/tmp/file_out3.nii')
     study_config.input_directory = self.tmpdir
     study_config.somaworkflow_computing_resource = 'localhost'
     study_config.somaworkflow_computing_resources_config.localhost = {
         'transfer_paths': [study_config.input_directory],
     }
     self.study_config = study_config
     engine = self.study_config.engine
     engine.load_module('spm')
     #with engine.settings as session:
         #ids = [c.config_id for c in session.configs('spm', 'global')]
         #for id in ids:
             #session.remove_config('spm', 'global', {'config_id': id})
         #session.new_config('spm', 'global',
                            #{'version': '12', 'standalone': True})
     study_config.spm_standalone = True
     study_config.spm_version = '12'
     study_config.somaworkflow_keep_succeeded_workflows = False
     self.exec_ids = []
 def setUp(self):
     self.pipeline = DummyPipeline()
     self.pipeline.input = '/tmp/file_in.nii'
     self.pipeline.output1 = '/tmp/file_out1.nii'
     self.pipeline.output2 = '/tmp/file_out2.nii'
     self.pipeline.output3 = '/tmp/file_out3.nii'
     study_config = StudyConfig() #modules=StudyConfig.default_modules \
                                #+ ['FomConfig'])
     study_config.input_directory = '/tmp'
     study_config.somaworkflow_computing_resource = 'localhost'
     study_config.somaworkflow_computing_resources_config.localhost = {
         'transfer_paths': [study_config.input_directory],
     }
     self.study_config = study_config
 def setUp(self):
     self.pipeline = DummyPipeline()
     self.pipeline.input = '/tmp/file_in.nii'
     self.pipeline.output1 = '/tmp/file_out1.nii'
     self.pipeline.output2 = '/tmp/file_out2.nii'
     self.pipeline.output3 = '/tmp/file_out3.nii'
     study_config = StudyConfig()  #modules=StudyConfig.default_modules \
     #+ ['FomConfig'])
     study_config.input_directory = '/tmp'
     study_config.somaworkflow_computing_resource = 'localhost'
     study_config.somaworkflow_computing_resources_config.localhost = {
         'transfer_paths': [study_config.input_directory],
     }
     self.study_config = study_config
예제 #5
0
    def setUp(self):
        self.pipeline = DummyPipeline()

        tmpout = tempfile.mkstemp('.txt', prefix='capsul_test_')
        os.close(tmpout[0])
        os.unlink(tmpout[1])

        self.output = tmpout[1]
        self.pipeline.input = '/tmp/file_in.nii'
        self.pipeline.output = self.output
        study_config = StudyConfig(modules=['SomaWorkflowConfig'])
        study_config.input_directory = '/tmp'
        study_config.somaworkflow_computing_resource = 'localhost'
        study_config.somaworkflow_computing_resources_config.localhost = {
            'transfer_paths': [],
        }
        self.study_config = study_config
예제 #6
0
    def setUp(self):
        self.pipeline = DummyPipeline()

        tmpout = tempfile.mkstemp('.txt', prefix='capsul_test_')
        os.close(tmpout[0])
        os.unlink(tmpout[1])

        self.output = tmpout[1]
        self.pipeline.input = '/tmp/file_in.nii'
        self.pipeline.output = self.output
        study_config = StudyConfig(modules=['SomaWorkflowConfig'])
        study_config.input_directory = '/tmp'
        study_config.somaworkflow_computing_resource = 'localhost'
        study_config.somaworkflow_computing_resources_config.localhost = {
            'transfer_paths': [],
        }
        self.study_config = study_config
예제 #7
0
    def setUp(self):
        self.pipeline = DummyPipeline()

        tmpdir = tempfile.mkdtemp('capsul_output_test')
        tmpout = os.path.join(tmpdir, 'capsul_test_node3_out.txt')

        self.tmpdir = tmpdir
        self.pipeline.input = os.path.join(tmpdir, 'file_in.nii')
        with open(self.pipeline.input, 'w') as f:
            print('Initial file content.', file=f)
        self.pipeline.output = tmpout
        study_config = StudyConfig(modules=['SomaWorkflowConfig'])
        study_config.input_directory = tmpdir
        study_config.somaworkflow_computing_resource = 'localhost'
        study_config.somaworkflow_computing_resources_config.localhost = {
            'transfer_paths': [],
        }
        self.study_config = study_config