Example #1
0
 def save_result_properties(self, result_properties):
     d = {'result_properties': result_properties}
     if not self.quiet:
         print(format_settings(d))
     d = filter_nested_dictionary(d, lambda x: x.startswith('_'))
     d = make_relative_paths(d, self.result_folder)
     return save_settings(join(self.result_folder, 'y.cfg'), d)
Example #2
0
 def save_result_properties(self, result_properties):
     d = {
         'result_properties': result_properties,
     }
     print(format_settings(filter_nested_dictionary(d, lambda x: x in [
         'standard_output', 'standard_error'])))
     d = filter_nested_dictionary(d, lambda x: x.startswith('_'))
     d = make_relative_paths(d, self.result_folder)
     return save_settings(join(self.result_folder, 'y.cfg'), d)
Example #3
0
 def save_result_arguments(self, result_arguments, environment):
     d = {
         'result_arguments': result_arguments,
     }
     if environment:
         d['result_environment'] = environment
     print(format_settings(d))
     print('')
     d = filter_nested_dictionary(
         d, lambda x: x.startswith('_') or x in ['target_folder'])
     d = make_relative_paths(d, self.result_folder)
     return save_settings(join(self.result_folder, 'x.cfg'), d)
Example #4
0
 def save_result_arguments(self, result_arguments, environment):
     d = {
         'result_arguments':
         OrderedDict((k, get_data_type(k).render(v))
                     for k, v in result_arguments.items())
     }
     if environment:
         d['result_environment'] = environment
     if not self.quiet:
         print(format_settings(d))
         print('')
     d = filter_nested_dictionary(
         d, lambda x: x.startswith('_') or x in RESERVED_ARGUMENT_NAMES)
     d = make_relative_paths(d, self.result_folder)
     return save_settings(join(self.result_folder, 'x.cfg'), d)
Example #5
0
 def save_tool_location(self, tool_definition):
     with suppress(ValueError):
         link_path(join(self.result_folder, 'f'), tool_definition[
             'configuration_folder'])
     configuration_path = tool_definition['configuration_path']
     d = {
         'tool_location': OrderedDict([
             ('tool_name', tool_definition['tool_name']),
             ('configuration_path', configuration_path),
         ]),
     }
     print(format_settings(d))
     print('')
     d['tool_location']['configuration_path'] = join('f', basename(
         configuration_path))
     return save_settings(join(self.result_folder, 'f.cfg'), d)