diff options
author | Peter Amstutz | 2020-07-08 15:48:44 -0400 |
---|---|---|
committer | Peter Amstutz | 2020-07-08 15:48:44 -0400 |
commit | 46e28c1d5da1c242fe49e5e5d6fdcae7dc544070 (patch) | |
tree | b9c22c396e7845ce91a831255cef09bbb61e5ac8 | |
parent | cbb191cb23f4e40b1a1d3024401960939fda9bc3 (diff) | |
download | bh20-seq-resource-46e28c1d5da1c242fe49e5e5d6fdcae7dc544070.tar.gz bh20-seq-resource-46e28c1d5da1c242fe49e5e5d6fdcae7dc544070.tar.lz bh20-seq-resource-46e28c1d5da1c242fe49e5e5d6fdcae7dc544070.zip |
Hack in a valid-uri check
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
-rw-r--r-- | bh20sequploader/qc_metadata.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bh20sequploader/qc_metadata.py b/bh20sequploader/qc_metadata.py index 2b57991..3e1e471 100644 --- a/bh20sequploader/qc_metadata.py +++ b/bh20sequploader/qc_metadata.py @@ -27,6 +27,10 @@ def qc_metadata(metadatafile): g = schema_salad.jsonld_context.makerdf("workflow", doc, document_loader.ctx) rslt, reason = evaluate(g, shex, doc["id"], "https://raw.githubusercontent.com/arvados/bh20-seq-resource/master/bh20sequploader/bh20seq-shex.rdf#submissionShape") + # As part of QC make sure serialization works too, this will raise + # an exception if there are invalid URIs. + g.serialize(format="ntriples") + if not rslt: raise Exception(reason) |