Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Add unittests to the json_to_yml converter and json cleaner #3

Open
LaRiffle opened this issue Oct 22, 2018 · 2 comments
Open

Add unittests to the json_to_yml converter and json cleaner #3

LaRiffle opened this issue Oct 22, 2018 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@LaRiffle
Copy link
Member

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!

@LaRiffle LaRiffle added the good first issue Good for newcomers label Oct 22, 2018
@jblemoine
Copy link
Contributor

jblemoine commented Oct 28, 2018

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 pushed a commit that referenced this issue Oct 28, 2018
Unittest for clean, convert and write modules.
@jblemoine jblemoine self-assigned this Oct 28, 2018
@LaRiffle
Copy link
Member Author

LaRiffle commented Oct 29, 2018

@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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants