@@ -127,6 +127,7 @@ def __init__(self, session_path, signatures, one=None):
127127
128128 # Find the lab
129129 labs = get_lab_from_endpoint_id (one = self .one )
130+
130131 if len (labs ) == 2 :
131132 # for flofer lab
132133 subject = self .one .path2ref (self .session_path )['subject' ]
@@ -167,13 +168,19 @@ def setUp(self):
167168 target_paths = []
168169 source_paths = []
169170 self .local_paths = []
170- for _ , d in df .iterrows ():
171+ for i , d in df .iterrows ():
171172 sess_path = Path (rel_sess_path ).joinpath (d ['rel_path' ])
172173 full_local_path = Path (self .globus .endpoints ['local' ]['root_path' ]).joinpath (sess_path )
173174 if not full_local_path .exists ():
175+
176+ if self .one ._index_type () is int :
177+ uuid = np2str (np .r_ [i [0 ], i [1 ]])
178+ elif self .one ._index_type () is str :
179+ uuid = i
180+
174181 self .local_paths .append (full_local_path )
175182 target_paths .append (sess_path )
176- source_paths .append (add_uuid_string (sess_path , np2str ( np . r_ [ d . name [ 0 ], d . name [ 1 ]]) ))
183+ source_paths .append (add_uuid_string (sess_path , uuid ))
177184
178185 if len (target_paths ) != 0 :
179186 ts = time ()
@@ -384,9 +391,15 @@ def setUp(self):
384391 df = super ().getData ()
385392
386393 SDSC_TMP = Path (SDSC_PATCH_PATH .joinpath (self .task .__class__ .__name__ ))
387- for _ , d in df .iterrows ():
394+ for i , d in df .iterrows ():
388395 file_path = Path (d ['session_path' ]).joinpath (d ['rel_path' ])
389- file_uuid = add_uuid_string (file_path , np2str (np .r_ [d .name [0 ], d .name [1 ]]))
396+
397+ if self .one ._index_type () is int :
398+ uuid = np2str (np .r_ [i [0 ], i [1 ]])
399+ elif self .one ._index_type () is str :
400+ uuid = i
401+
402+ file_uuid = add_uuid_string (file_path , uuid )
390403 file_link = SDSC_TMP .joinpath (file_path )
391404 file_link .parent .mkdir (exist_ok = True , parents = True )
392405 file_link .symlink_to (
0 commit comments