issue with HL7/FHIR-R4 models validation : tests failed with "*** schema.json file not found"
I have this error resulting of the Account HL7 model validation:
"test_schema_metadata": {
"test_name": "Validating schema.json metadata",
"success": false,
"message": [
"*** schema.json file not found"
]
},
which shows an issue since the shema.json is found ! through "test_file_exists" test !
=> the initial path of the model, for our case: https://raw.githubusercontent.com/agaldemas/incubated/master/SMARTHEALTH/HL7/FHIR-R4/ is not preserved
but replaced replaced by the root of the subject + model name, and then the schema.json is found in "test_file_exists", but not after ????
something is wrong in the reasoning of getting files and their path for validation....
in particular, I think it's in the function def download_files(subject_root, download_dir): from test_data_model/master_tests.py
it also affect other tests which fail with file not foud:
- "test_string_incorrect"
- "test_valid_keyvalues_examples"
- "test_valid_ngsiv2"
- "test_valid_ngsild"
- "test_duplicated_attributes"
- "test_array_object_structure"
Improvement proposal
Instead of fixing th path issue, I propose to improve the way testing work:
- In "download_files(subject_root, download_dir)" function we store schema and examples, in global dictionnary,
- Then use the right dict as parameter to any further test function !
- with this improvement, you load the files only 1 time and keep in memory !!!! (much more efficient !!!!