Skip to content

Commit 589fe73

Browse files
committed
Fix YAML dumping style for consistency in output files.
The default_flow_style=None will let it use a single line for things like [1.3, 4.0, 4.45]. Which should look more like we expected. It's a bit clunky that we have to read the yaml, modify the dicts, and dump the yaml, but this should make the changes less obnoxious.
1 parent ea374fa commit 589fe73

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rmgpy/rmg/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,10 +1263,10 @@ def execute(self, initialize=True, **kwargs):
12631263
annotated_content['species'] = content['species']
12641264

12651265
with open(chem_yaml_path, 'w') as output_f:
1266-
yaml.dump(content, output_f, sort_keys=False)
1266+
yaml.dump(content, output_f, sort_keys=False, default_flow_style=None)
12671267

12681268
with open(annotated_yaml_path, 'w') as output_f:
1269-
yaml.dump(annotated_content, output_f, sort_keys=False)
1269+
yaml.dump(annotated_content, output_f, sort_keys=False, default_flow_style=None)
12701270

12711271
else: # gas phase only
12721272
self.generate_cantera_files(os.path.join(self.output_directory, "chemkin", "chem.inp"))

0 commit comments

Comments
 (0)