@@ -52,44 +52,43 @@ def extract_software_info_from_somef(somef_data: Dict) -> Dict:
5252
5353def get_pitfall_description (pitfall_code : str ) -> str :
5454 """
55- Get the description for a given pitfall/warning code .
55+ Get the description of how a given pitfall/warning is detected .
5656 """
5757 descriptions = {
5858 # Pitfalls (P001-P018)
59- "P001" : "The metadata file (codemeta or other) has a version which does not correspond to the version used in the latest release" ,
60- "P002" : "LICENSE file contains template placeholders like <program>, <year>, <name of author> that were not replaced " ,
61- "P003" : "Metadata files have multiple authors in single field instead of a list " ,
62- "P004" : "In codemeta.json README property pointing to their homepage/ wiki instead of README file" ,
63- "P005" : "codemeta.json referencePublication refers to software archive instead of paper " ,
64- "P006" : "The metadata file has License pointing to a local file instead of stating the name " ,
65- "P007" : "CITATION.cff does not have referencePublication even though it's referenced in codemeta.json " ,
66- "P008" : "The metadata file softwareRequirement points to an invalid page " ,
67- "P009" : "The metadata file coderepository points to their homepage" ,
68- "P010" : "LICENSE file only contains copyright information without actual license terms" ,
69- "P011" : "codemeta.json IssueTracker violates the expected URL format " ,
70- "P012" : "codemeta.json downloadURL is outdated " ,
71- "P013" : "The metadata file License does not have the specific version" ,
72- "P014" : "codemeta.json uses bare DOIs in the identifier field instead of full https://doi.org/ URL" ,
73- "P015" : "In codemeta.json contIntegration link returns 404" ,
74- "P016" : "The metadata file codeRepository does not point to the same repository " ,
75- "P017" : "codemeta.json version does not match the package's " ,
76- "P018" : "codemeta.json Identifier uses raw SWHIDs without their resolvable URL " ,
59+ "P001" : "Compares the version found in the metadata file with the latest repository release tag. " ,
60+ "P002" : "Searches for common template placeholders (e.g., <program>, <year>) within the LICENSE file. " ,
61+ "P003" : "Analyzes author fields in metadata to see if multiple distinct authors are merged into a single string. " ,
62+ "P004" : "Checks the README property in codemeta.json to see if it links to a homepage or wiki rather than the actual README file. " ,
63+ "P005" : "Checks the referencePublication in codemeta.json to verify it points to a paper rather than a software archive. " ,
64+ "P006" : "Checks if the License property in the metadata file points to a local file path instead of an SPDX license identifier. " ,
65+ "P007" : "Checks CITATION.cff for a referencePublication when codemeta.json includes one but the CFF file does not. " ,
66+ "P008" : "Validates the URLs provided in the softwareRequirement field to ensure they return a successful HTTP status. " ,
67+ "P009" : "Checks if the codeRepository field points to a project homepage rather than the actual source code repository. " ,
68+ "P010" : "Analyzes the LICENSE file to determine if it only contains a copyright notice without any actual usage terms. " ,
69+ "P011" : "Validates the IssueTracker URL format in codemeta.json against expected provider patterns (e.g., GitHub issues). " ,
70+ "P012" : "Validates the downloadURL in codemeta.json to ensure the link is active and valid. " ,
71+ "P013" : "Checks if the declared License in the metadata lacks a specific version number. " ,
72+ "P014" : "Checks the identifier field in codemeta.json to see if it uses a bare DOI string instead of a full HTTPS URL. " ,
73+ "P015" : "Sends a request to the contIntegration URL in codemeta.json to verify it does not return a 404 Not Found error. " ,
74+ "P016" : "Compares the origin repository URL with the codeRepository URL in the metadata file to ensure they match. " ,
75+ "P017" : "Compares the version field in codemeta.json against the package manager version. " ,
76+ "P018" : "Checks the Identifier field in codemeta.json to see if it contains raw SWHIDs instead of their resolvable URLs. " ,
7777
7878 # Warnings (W001-W010)
79- "W001" : "Software requirements in metadata files don't have version specifications " ,
80- "W002" : "The dateModified in codemeta.json is outdated compared to the actual repository last update date " ,
81- "W003" : "Codemeta.json repository has multiple licenses but only one is listed " ,
82- "W004" : "Programming languages in codemeta.json do not have versions " ,
83- "W005" : "The metadata file softwareRequirements have more than one req, but it's written as one string" ,
84- "W006" : "codemeta.json Identifier is a name instead of a valid unique identifier, but an identifier exist " ,
85- "W007" : "codemeta.json Identifier is empty" ,
86- "W008" : "The metadata file GivenName is a list instead of a string " ,
87- "W009" : "codemeta.json developmentStatus is a URL instead of a string" ,
88- "W010" : "The metadata file codeRepository uses Git remote-style shorthand instead of full URL" ,
79+ "W001" : "Analyzes software requirements in metadata to see if they lack explicit version constraints. " ,
80+ "W002" : "Compares the dateModified field against the last updated date of the actual repository. " ,
81+ "W003" : "Detects if multiple distinct licenses are found in the repository but only a single license is declared in codemeta.json. " ,
82+ "W004" : "Checks programming language declarations in codemeta.json to see if they lack specific version numbers. " ,
83+ "W005" : "Checks if the softwareRequirements field contains multiple dependencies combined into a single continuous string. " ,
84+ "W006" : "Checks if the existing identifier in codemeta.json is a plain name rather than an actual unique identifier (URL). " ,
85+ "W007" : "Checks if the Identifier field in codemeta.json is empty or completely missing. " ,
86+ "W008" : "Checks the GivenName field in the metadata file to ensure it is stored as a simple string rather than a parsed list. " ,
87+ "W009" : "Checks if the developmentStatus in codemeta.json is provided as a URL instead of a descriptive string. " ,
88+ "W010" : "Checks if the codeRepository URL uses Git remote-style shorthand (e.g., git@github.com:...) instead of a full HTTPS URL. " ,
8989 }
9090
91- return descriptions .get (pitfall_code , f"Description for { pitfall_code } " )
92-
91+ return descriptions .get (pitfall_code , f"Detection process for { pitfall_code } " )
9392
9493def extract_metadata_source (pitfall_result : Dict ) -> str :
9594 """
@@ -453,7 +452,7 @@ def create_pitfall_jsonld(somef_data: Dict, pitfall_results: List[Dict], file_na
453452 description_info = extract_description_info (somef_data )
454453
455454 jsonld_output = {
456- "@context" : "https://w3id.org/example/metacheck/0.2.0/ " ,
455+ "@context" : "[IN PROCESS] " ,
457456 "@type" : "SoftwareQualityAssessment" ,
458457 "name" : f"Quality Assessment for { software_info ['name' ]} " ,
459458 "description" : description_info ,
0 commit comments