@@ -43,8 +43,12 @@ def print_linkml_report(report: ValidationReport, fail_on_error: bool = True):
43
43
else :
44
44
for result in report .results :
45
45
validation_errors += 1
46
- if result .severity == Severity .ERROR :
46
+ if ( result .severity == Severity .FATAL ) or ( result . severity == Severity . ERROR ) :
47
47
logging .error (result .message )
48
+ elif result .severity == Severity .WARN :
49
+ logging .error (result .message )
50
+ elif result .severity == Severity .INFO :
51
+ logging .info (result .message )
48
52
49
53
if fail_on_error and validation_errors :
50
54
raise ValidationError (f"You mapping set has { validation_errors } validation errors!" )
@@ -101,7 +105,6 @@ def validate_json_schema(msdf: MappingSetDataFrame, fail_on_error: bool = True)
101
105
mapping_set_dict = json_dumper .to_dict (mapping_set )
102
106
103
107
report = validator .validate (mapping_set_dict , "mapping set" )
104
- # TODO fail_on_error: False because of https://github.com/linkml/linkml/issues/2164
105
108
print_linkml_report (report , fail_on_error )
106
109
107
110
@@ -146,11 +149,10 @@ def check_all_prefixes_in_curie_map(msdf: MappingSetDataFrame, fail_on_error: bo
146
149
severity = Severity .ERROR ,
147
150
instance = None ,
148
151
instantiates = None ,
149
- message = f"Missing { prefix } " ,
152
+ message = f"Missing prefix: { prefix } " ,
150
153
)
151
154
)
152
155
report = ValidationReport (results = validation_results )
153
- # TODO fail_on_error: False because of https://github.com/linkml/linkml/issues/2164
154
156
print_linkml_report (report , fail_on_error )
155
157
156
158
0 commit comments