Enable parallel run of RCE by bug fixing assessment handling
Bug Report
With the new handling of the nested folders of the assessment tools, the parallel execution does not work
Description
This was discussed with @Florian.Schueltke, @kristina.mazur and @AndiGob on 16.10. and following changes should fix it:
-
set_configuration_parameter.py- one subdirectory is missing (is currently looking in assessment/ but should look in assessment/cost/ or assessment/emissions). This should ensure that all config files are saved to temp.
''' create list of files in working directory '''
files_in_working_directory = os.listdir(path_of_working_directory)
discovered_tools = []
for item in files_in_working_directory:
if item == 'assessment':
assessment_src_path = os.path.join(path_of_working_directory, 'assessment')
for tool_name in os.listdir(assessment_src_path):
tool_conf_path = os.path.join(assessment_src_path, tool_name, f"{tool_name}_conf.xml")
if os.path.isfile(tool_conf_path):
discovered_tools.append(tool_name)
files_in_working_directory.extend(discovered_tools)
-
final_operations_of_sizing_loop.pymove code to post processing - this should ensure that all config files are saved in the postProcessing folder (it already does but this is not were it belongs to):
# add assessment sub tools seperatly
assessment_install_path = os.path.join(path_of_working_directory, 'assessment')
if os.path.isdir(assessment_install_path):
# The destination for ALL assessment-related configs will be the 'postProcessing' archive folder.
dest_archive_dir = os.path.join(path_of_config_archive, 'postProcessing')
for root, dirs, files in os.walk(assessment_install_path):
for file in files:
if file.endswith('_conf.xml'):
...
Expected Behavior
Parallel execution should work