RDFLib / pyLODE

An OWL ontology documentation tool using Python and templating, based on LODE
BSD 3-Clause "New" or "Revised" License
162 stars 70 forks source link

Exit code on failure #196

Open bretelerjmw opened 8 months ago

bretelerjmw commented 8 months ago

When I generate an error because of a missing title for my ontology, my CI/CD runner does not consider the script execution to have failed. I expected an error to result in a non-zero exit code, which I need so CI/CD detects a failure.

CI/CD log:

$ python -m pylode $ONTOLOGY_PATH -o ./documentation/index.html
ERROR: You MUST supply a title property (dcterms:title, rdf:label or sdo:name) for your ontology
$ echo $?
0

The error being raised here is, I think, a PyLodeError which just subclasses from Exception without any modifications.

Am I missing something?