@@ -164,23 +164,14 @@ def get_input_el(self, ind):
164164 ])
165165 if not from_node .mapper :
166166 dir_nm_el_from = ""
167-
168- if is_node (from_node ) and is_current_interface ( from_node . interface ) :
167+ # TODO: do I need this if, what if this is wf?
168+ if is_node (from_node ):
169169 out_from = self ._reading_ci_output (
170170 node = from_node , dir_nm_el = dir_nm_el_from , out_nm = from_socket )
171171 if out_from :
172172 inputs_dict ["{}.{}" .format (self .name , to_socket )] = out_from
173173 else :
174- raise Exception ("{} doesnt exist" .format (file_from ))
175- else : # assuming here that I want to read the file (will not be used with the current interfaces)
176- file_from = os .path .join (from_node .workingdir , dir_nm_el_from ,
177- from_socket + ".txt" )
178- with open (file_from ) as f :
179- content = f .readline ()
180- try :
181- inputs_dict ["{}.{}" .format (self .name , to_socket )] = eval (content )
182- except NameError :
183- inputs_dict ["{}.{}" .format (self .name , to_socket )] = content
174+ raise Exception ("output from {} doesnt exist" .format (from_node ))
184175
185176 return state_dict , inputs_dict
186177
@@ -302,14 +293,6 @@ def run_interface_el(self, i, ind):
302293 # dir_nm_el = os.path.join(dir_join, dir_nm_el)
303294 return res
304295
305- def _writting_results_tmp (self , state_dict , dir_nm_el , output ):
306- """temporary method to write the results in the files (this is usually part of a interface)"""
307- if not self .mapper :
308- dir_nm_el = ''
309- os .makedirs (os .path .join (self .workingdir , dir_nm_el ), exist_ok = True )
310- for key_out , val_out in output .items ():
311- with open (os .path .join (self .workingdir , dir_nm_el , key_out + ".txt" ), "w" ) as fout :
312- fout .write (str (val_out ))
313296
314297 def get_output (self ):
315298 """collecting all outputs and updating self._output"""
0 commit comments