G-Node / python-odml

odML libraries
http://g-node.github.io/python-odml/
BSD 4-Clause "Original" or "Old" License
24 stars 30 forks source link

Validation changes #389

Closed mpsonntag closed 4 years ago

mpsonntag commented 4 years ago

This PR contains a couple of potentially controversial points and should be discussed here before merging and addresses the issues #377, #378 and #379.

Changes to the Validation class enabling Custom Validation Instances sneaked itself in at an earlier commit and should be taken into account when reviewing this PR. Check changes in Validation.__init__() and run_validation and register_custom_handler methods. Sorry for the mixup...

This PR

Fixes:

Points for discussion before merging:

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.08%) to 77.027% when pulling 271d78d10fc19f052b70d0b58c1d02655b7bb58d on mpsonntag:refactorValid into 266f1c1bd56c9d253eaccf26112ac177c9679f35 on G-Node:master.

achilleas-k commented 4 years ago

Looks great! Thanks.

One small note: I think the reason I brought up 3-digit status codes in our last meeting was to separate the categories by the first digit, so 1xx would signify a required attribute value is missing or empty, 2xx would mean a uniqueness constraint is violated, 4xx is property related, and so on. The idea was that if we somehow end up with more than 10 rules for a category (e.g., 10 rules for properties) the 2-digit system wouldn't suffice.

achilleas-k commented 4 years ago

That was quick. @jgrewe I'm good to merge.