mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
framework/configuration: Refactor code into seperate method
This commit is contained in:
parent
f3bb8e135a
commit
31b46fb3b7
@ -35,8 +35,12 @@ def generate_default_config(path):
|
|||||||
with open(path, 'w') as output:
|
with open(path, 'w') as output:
|
||||||
for param in MetaConfiguration.config_points + RunConfiguration.config_points:
|
for param in MetaConfiguration.config_points + RunConfiguration.config_points:
|
||||||
entry = {param.name: param.default}
|
entry = {param.name: param.default}
|
||||||
comment = _format_yaml_comment(param)
|
write_param_yaml(entry, param, output)
|
||||||
output.writelines(comment)
|
|
||||||
yaml.dump(entry, output, default_flow_style=False)
|
|
||||||
output.write("\n")
|
|
||||||
_format_augmentations(output)
|
_format_augmentations(output)
|
||||||
|
|
||||||
|
|
||||||
|
def write_param_yaml(entry, param, output):
|
||||||
|
comment = _format_yaml_comment(param)
|
||||||
|
output.writelines(comment)
|
||||||
|
yaml.dump(entry, output, default_flow_style=False)
|
||||||
|
output.write("\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user