diff --git a/fuji_server/data/software_file.json b/fuji_server/data/software_file.json index 9d7f3b57..c83ec62f 100644 --- a/fuji_server/data/software_file.json +++ b/fuji_server/data/software_file.json @@ -42,7 +42,8 @@ "parse": "full", "pattern": [ "(\\w*/)*LICEN(S|C)E(\\.\\w*)?", - "(\\w*/)*licen(s|c)e(\\.\\w*)?" + "(\\w*/)*licen(s|c)e(\\.\\w*)?", + "(\\w*/)*COPYING" ] }, "maven_pom": { diff --git a/fuji_server/evaluators/fair_evaluator_license_file.py b/fuji_server/evaluators/fair_evaluator_license_file.py index 6cd5dce7..99491865 100644 --- a/fuji_server/evaluators/fair_evaluator_license_file.py +++ b/fuji_server/evaluators/fair_evaluator_license_file.py @@ -49,15 +49,15 @@ def setLicenseDataAndOutput(self): self.license_info = [] # check for any recognised license files parsed_license_file_data = self.fuji.github_data.get("license_file") - if parsed_license_file_data is not None and len(parsed_license_file_data) > 0: - license_file_paths = [lf["path"] for lf in parsed_license_file_data] metadata_license = self.fuji.github_data.get("license") metadata_license_path = self.fuji.github_data.get("license_path") recognised_licenses = [] if metadata_license is not None: - for lfp in license_file_paths: # only use metadata information if it matches a license file - if lfp == metadata_license_path: - recognised_licenses.append(metadata_license) + if parsed_license_file_data is not None and len(parsed_license_file_data) > 0: + license_file_paths = [lf["path"] for lf in parsed_license_file_data] + for lfp in license_file_paths: # only use metadata information if it matches a license file + if lfp == metadata_license_path: + recognised_licenses.append(metadata_license) if recognised_licenses is not None and recognised_licenses != []: for license in recognised_licenses: isurl = False