wtsi-hgi / gatk-cwl-generator

Generates CWL files from the GATK documentation
MIT License
7 stars 1 forks source link

can't install cwlref-runner and gatk-cwl-generator in same python env #9

Closed jrandall closed 6 years ago

jrandall commented 6 years ago

gatk-cwl-generator is now using ruamel.yaml>=0.15 but this is incompatible with cwlref-runner.

cwlref-runner complains:

'ruamel.yaml<0.15,>=0.12.4' distribution was not found and is required by schema-salad, cwltool

For some reason, ruamel.yaml is making incompatible changes to their API from 0.15. From https://yaml.readthedocs.io/en/latest/api.html:

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)
jrandall commented 6 years ago

Fixed in 8eef9cea although at the expensive of slightly less pretty list indentation in the resulting YAML.