@@ -105,16 +105,27 @@ def build_summary(self,
105105 for task in self .tasks_summary [task_name ]:
106106 runtime_list .append (task .runtime )
107107
108- for file in task .files :
109- extension : str = path .splitext (file .name )[1 ] if '.' in file .name else file .name
108+
109+ # For each input_file and output_file, append the file size to the dictionary
110+ for infile in task .input_files :
111+ extension : str = path .splitext (infile .file_id )[1 ] if '.' in infile .file_id else infile .file_id
112+ if extension [1 :].isnumeric ():
113+ extension = path .splitext (infile .file_id .replace (extension , '' ))[1 ]
114+
115+ # Check if the file is definetly an input
116+ assert infile .link == FileLink .INPUT , f"{ infile .file_id } is not set as input"
117+ _append_file_to_dict (extension , inputs_dict , infile .size )
118+
119+ for outfile in task .output_files :
120+ extension : str = path .splitext (outfile .file_id )[1 ] if '.' in outfile .file_id else outfile .file_id
110121 if extension [1 :].isnumeric ():
111- extension = path .splitext (file . name .replace (extension , '' ))[1 ]
122+ extension = path .splitext (outfile . file_id .replace (extension , '' ))[1 ]
112123
113- if file .link == FileLink .INPUT :
114- _append_file_to_dict (extension , inputs_dict , file .size )
115- elif file .link == FileLink .OUTPUT :
116- _append_file_to_dict (extension , outputs_dict , file .size )
124+ # Check if the file is definetly an output
125+ assert outfile .link == FileLink .OUTPUT , f"{ outfile .file_id } is not set as output"
126+ _append_file_to_dict (extension , outputs_dict , outfile .size )
117127
128+ # Find the best fit distribution for each file type
118129 _best_fit_distribution_for_file (inputs_dict , include_raw_data )
119130 _best_fit_distribution_for_file (outputs_dict , include_raw_data )
120131
0 commit comments