Before 0.15.0:
from pathlib import Path
from ruamel import yaml
data = yaml.safe_load("abc: 1")
out = Path('/tmp/out.yaml')
with out.open('w') as fp:
yaml.safe_dump(data, fp, default_flow_style=False)
after:
from pathlib import Path
from ruamel.yaml import YAML
yaml = YAML(typ='safe')
yaml.default_flow_style = False
data = yaml.load("abc: 1")
out = Path('/tmp/out.yaml')
yaml.dump(data, out)
gatk-cwl-generator is now using
ruamel.yaml>=0.15
but this is incompatible with cwlref-runner.cwlref-runner complains:
For some reason, ruamel.yaml is making incompatible changes to their API from 0.15. From https://yaml.readthedocs.io/en/latest/api.html: