You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
writeYAMLmodel: YAML 1.1 booleans such as NO are written unquoted #10
needsQuote in src/io/writeYAMLmodel.m quotes the YAML 1.2 booleans (true, True, TRUE, false, False, FALSE) but not the YAML 1.1 ones. A metabolite named NO (nitric oxide) is therefore written as
- name: NO
- formula: NO
and a YAML 1.1 loader such as PyYAML reads both values as False:
>>>yaml.safe_load("- name: NO")
[{'name': False}]
Human-GEM's model/Human-GEM.yml has this for MAM02609c and MAM02609e. It also has formula: Y (MAM02022) and 212 compartment: n values. PyYAML reads y and n as strings, but they are booleans in the YAML 1.1 spec.
Proposal: also quote y, n, yes, no, on and off in any case. raven-toolbox ports this function and has the same gap; it is fixed there in CompMetEng/raven-toolbox#179 (issue CompMetEng/raven-toolbox#178), so that both writers keep writing the same bytes.
Activity
fix: quote YAML 1.1 booleans, fix replaceMets, and align task lists, …