Skip to content

Commit f9053b4

Browse files
committed
feat: define severity levels of validation results
1 parent 4efe951 commit f9053b4

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

dandi/validate_types.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,28 @@ class ValidationOrigin:
4949
standard_version: str | None = None # Version of the standard
5050

5151

52-
# TODO: decide on the naming consistency -- either prepend all with Validation or not
5352
class Severity(IntEnum):
54-
HINT = 1
55-
INFO = 2 # new/unused, available in linkml
56-
WARNING = 3
57-
ERROR = 4
58-
CRITICAL = 5 # new/unused, linkml has FATAL
53+
"""Severity levels for validation results"""
54+
55+
INFO = 10
56+
"""Not an indication of problem but information of status or confirmation"""
57+
58+
HINT = 20
59+
"""Data is valid but could be improved"""
60+
61+
WARNING = 30
62+
"""Data is not recognized as valid. Changes are needed to ensure validity"""
63+
64+
ERROR = 40
65+
"""Data is recognized as invalid"""
66+
67+
CRITICAL = 50
68+
"""
69+
A serious invalidity in data.
70+
E.g., an invalidity that prevents validation of other aspects of the data such
71+
as when validating against the BIDS standard, the data is without a `BIDSVersion`
72+
field or has an invalid `BIDSVersion` field.
73+
"""
5974

6075

6176
class Scope(Enum):

0 commit comments

Comments
 (0)