You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run pySHACL inside Docker and I cannot determine whether pySHACL aborted due to invalid parameters or whether it just found violations against the given SHACL shape, because in both cases the exit code is 1.
It is possible to create a workaround using grep and if-statements but that is inelegant and could break in the future.
Is there some official way to get pySHACL to exit with code 0 when there is no error in the given parameters or some other elegant way of determining if it succeeded running, regardless of whether the validation was successful or not?
The reason I need this is to implement a GitHub action on https://github.com/KonradHoeffner/shacl/ that should ultimately result in a GitHub repository badge with a count of validation errors.
The text was updated successfully, but these errors were encountered:
You raise a good point. I didn't consider that the python argparse library will exit with 1 when you pass in invalid arguments.
That does conflict with the shape violations return type.
Changing return values would unfortunately be a breaking change for some people, so this will need to wait until the next big release (probably v1.0), I'll make shape violation code 2, and shift the other return codes accordingly.
I run pySHACL inside Docker and I cannot determine whether pySHACL aborted due to invalid parameters or whether it just found violations against the given SHACL shape, because in both cases the exit code is 1.
It is possible to create a workaround using grep and if-statements but that is inelegant and could break in the future.
Is there some official way to get pySHACL to exit with code 0 when there is no error in the given parameters or some other elegant way of determining if it succeeded running, regardless of whether the validation was successful or not?
The reason I need this is to implement a GitHub action on https://github.com/KonradHoeffner/shacl/ that should ultimately result in a GitHub repository badge with a count of validation errors.
The text was updated successfully, but these errors were encountered: