Esempio n. 1
0
 def test_AnDO_Func_experiment_level(self):
     """
     Check if the experiment level follow the rules given in
     rules/experiment_rules.json
     """
     names = list()
     names = ['Landing', 'sub-anye', '180116_001_m_anye_land-001', 'source']
     validate = list()
     self.assertEqual(andoE.check_Path(names, False)[0], True)
Esempio n. 2
0
 def test_AnDO_Func_subject_level(self):
     """
     Check if the subject level follow the rules given in
     rules/subject_rules.json
     """
     names = list()
     names = [
         'exp-Landing', 'anye', 'sess-180116_001_m_anye_land-001', 'source'
     ]
     validate = list()
     self.assertEqual(andoE.check_Path(names, False)[0], True)
Esempio n. 3
0
    def get_all_folder_paths(self):
        paths = []
        session = self.get_session_path()
        for datafolder in [MANDATORY_SUBFOLDER]:
            paths.append(os.path.join(session, datafolder))

        # validate generated paths with AnDO
        combined_paths = []
        for path in paths:
            for folder in path.split(os.path.sep):
                if folder not in combined_paths:
                    combined_paths.append(folder)
        assert not check_Path(combined_paths, verbose=False)[0], \
            'Error in AnDO path generation. Generated paths are not consistent with AnDO ' \
            'specifications'
        return paths