Skip to content

[Webservice] Don't sort YAML keys on config changes

Thomas Kluyver requested to merge feat/no-sort-yaml into master

Description

PyYAML by default sorts all the keys when writing. This can make it harder to see what, if anything, has actually changed in a commit like this one:

https://git.xfel.eu/detectors/calibration_configurations/-/commit/77d673f360c81dbae77aaf77a1cee612f304fcc1

This disables sorting keys, to hopefully make smaller diffs.

default_flow_style=False is now the default in PyYAML, so I've stopped explicitly setting that.

How Has This Been Tested?

It hasn't; it's tricky to test this without changing real config, but the change is very simple. 🤞

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.

Reviewers

@schmidtp @ahmedk

Merge request reports