Skip to content

Commit 0dae68a

Browse files
committed
Added logic to write machine configs to YAML file in alphabetical order of instrument name
1 parent 6ffd694 commit 0dae68a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/murfey/cli/generate_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,8 @@ def set_up_machine_config(debug: bool = False):
11471147
# Add new machine config
11481148
else:
11491149
old_config[key] = master_config[key]
1150-
# Overwrite
1151-
master_config = old_config
1150+
# Regenerate dictionary and store machine configs alphabetically
1151+
master_config = {key: old_config[key] for key in sorted(old_config.keys())}
11521152
with open(config_file, "w") as save_file:
11531153
yaml.dump(master_config, save_file, default_flow_style=False, sort_keys=False)
11541154
console.print(

0 commit comments

Comments
 (0)