@@ -43,8 +43,12 @@ def print_linkml_report(report: ValidationReport, fail_on_error: bool = True):
4343 else :
4444 for result in report .results :
4545 validation_errors += 1
46- if result .severity == Severity .ERROR :
46+ if ( result .severity == Severity .FATAL ) or ( result . severity == Severity . ERROR ) :
4747 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 )
4852
4953 if fail_on_error and validation_errors :
5054 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)
101105 mapping_set_dict = json_dumper .to_dict (mapping_set )
102106
103107 report = validator .validate (mapping_set_dict , "mapping set" )
104- # TODO fail_on_error: False because of https://github.com/linkml/linkml/issues/2164
105108 print_linkml_report (report , fail_on_error )
106109
107110
@@ -146,11 +149,10 @@ def check_all_prefixes_in_curie_map(msdf: MappingSetDataFrame, fail_on_error: bo
146149 severity = Severity .ERROR ,
147150 instance = None ,
148151 instantiates = None ,
149- message = f"Missing { prefix } " ,
152+ message = f"Missing prefix: { prefix } " ,
150153 )
151154 )
152155 report = ValidationReport (results = validation_results )
153- # TODO fail_on_error: False because of https://github.com/linkml/linkml/issues/2164
154156 print_linkml_report (report , fail_on_error )
155157
156158
0 commit comments