Closed juettemann closed 4 years ago
@juettemann those xmls are not in your branch. i have fixed this in feb2020, with these xmls:
python -m version_metadata -overwrite-outfile -out:./delete_me -experiment version_metadata/examples/experiment.one_invalid_missing_type.xml
and
python -m version_metadata -overwrite-outfile -out:./delete_me -sample version_metadata/examples/sample-Primary_Tissue-missing_biomaterial.xml
{
"version_metadata/examples/sample-Primary_Tissue-missing_biomaterial.xml": [
{
"ENCBS054KUO": {
"error_type": "__prevalidation__",
"errors": [
"missing biomaterial_type : prevalidation"
],
"ok": false,
"version": "1.1"
}
},
{
"ENCBS054KUO": {
"error_type": "__prevalidation__",
"errors": [
"missing biomaterial_type : prevalidation"
],
"ok": false,
"version": "1.0"
}
}
]
}
@sitag The branches have been merged with master and deleted 5 days ago, all tests should be there. This looks great and is working. I am closing it, if something else arises I'll open a new issue.
Missing EXPERIMENT_TYPE or BIOMATERIAL_TYPE results in an assertion error. Can this be caught in the prevalidation?
If possible, an assertion error should only happen if there is a syntax mistake (e.g. missing closing tag) in the XML. Further, I could not see a way to identify the erroneous record in case the XML contains multiple records.
Test files
examples/sample-no_BIOMATERIAL_TYPE.xml
Command
python -m version_metadata -overwrite-outfile -out:./delete_me -sample version_metadata/examples/sample-no_BIOMATERIAL_TYPE.xml
Output