@@ -484,7 +484,6 @@ def create_pitfall_jsonld(somef_data: Dict, pitfall_results: List[Dict], file_na
484484 """
485485 Create a JSON-LD structure for detected pitfalls following the sample format.
486486 """
487- import hashlib
488487 software_info = extract_software_info_from_somef (somef_data )
489488 description_info = extract_description_info (somef_data )
490489
@@ -516,7 +515,7 @@ def create_pitfall_jsonld(somef_data: Dict, pitfall_results: List[Dict], file_na
516515
517516 output_val = "true" if has_issue else "false"
518517 evidence_val = format_evidence_text (pitfall_code , pitfall_result ) if has_issue else f"{ pitfall_code } not detected:"
519- suggestion_val = get_suggestion_text (pitfall_code ) if has_issue else ""
518+ suggestion_val = get_suggestion_text (pitfall_code ) if has_issue else "N/A "
520519
521520 check_result = {
522521 "@type" : "CheckResult" ,
@@ -529,13 +528,11 @@ def create_pitfall_jsonld(somef_data: Dict, pitfall_results: List[Dict], file_na
529528 },
530529 "process" : get_pitfall_description (pitfall_code ),
531530 "status" : {"@id" : "schema:CompletedActionStatus" },
531+ "pitfall" : f"https://w3id.org/rsmetacheck/catalog/#{ pitfall_code } " ,
532532 "output" : output_val ,
533533 "evidence" : evidence_val ,
534534 "suggestion" : suggestion_val
535535 }
536-
537- check_hash = hashlib .sha256 (json .dumps (check_result , sort_keys = True ).encode ("utf-8" )).hexdigest ()
538- check_result ["checkId" ] = check_hash
539536
540537 jsonld_output ["checks" ].append (check_result )
541538
0 commit comments