HomePhabricator

Reformat some YAML files

Authored by Krenair on Aug 11 2019, 9:25 PM.

Description

Reformat some YAML files

So that it can be round-tripped using the ruamel.yaml Python library without
formatting changes from here on.

This library seems to preserve most things, except for some inconsistent
indentation.

The code used to produce this is:
import ruamel.yaml
for group in ['ExtensionsAgg', 'WikimediaMainAgg', 'WikimediaTechnicalAgg', 'WikimediaAdvancedAgg']:

fname = 'groups/MediaWiki/{}.yaml'.format(group)
docs = list(ruamel.yaml.YAML().load_all(open(fname)))
yaml = ruamel.yaml.YAML()
yaml.indent(mapping=2, sequence=4, offset=2)
with open(fname, 'w') as f:
    for i, doc in enumerate(docs):
        yaml.dump(doc, f)
        if i < len(docs) - 1:
            f.write('\n---\n')

Change-Id: I1761ef2b07fb4d1510bbbc7eec7bb5a9b5f3b075

Details

Committed
jenkins-botAug 14 2019, 12:20 PM
Parents
rGTWNa1e0b3784282: [MachineVision] Deployed to Beta
Branches
Unknown
Tags
Unknown
ChangeId
I1761ef2b07fb4d1510bbbc7eec7bb5a9b5f3b075