Open LaRiffle opened 5 years ago
How would you assess a yaml has a correct format ? Meaning that json_to_yml
function ouput is correct ?
For json file,it is easy to validate format with json.loads(text)
, however there is no yaml equivalent.
@jblemoine I think there is two options: Either use a yaml python library, do like json.loads and check that it loads correctly, and optionnaly check that the python object is the same than the original one (before json_to_yaml) Or, just write plain yml target files from json using an online tool and check that our converter matches the yml expected file (beware the the online json_to_ymal tools or not always very clever)
Add unittests
We already have a parser for hl7 resources which convert it in our yml format and conventions. The input format can be found for example for Patient in the Json tab: it looks like JSON but is not valid. We'd like to improve our parser and to add unittests to ensure that it's working well. If you have already done Unittest, this is a very good first issue!