Skip to content

Commit

Permalink
Merge pull request #34 from softwaresaved/fuji/master
Browse files Browse the repository at this point in the history
Fold in bug fixes
  • Loading branch information
karacolada authored May 23, 2024
2 parents 0aadc41 + 1778e73 commit 03c8f24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion fuji_server/data/software_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
10 changes: 5 additions & 5 deletions fuji_server/evaluators/fair_evaluator_license_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03c8f24

Please sign in to comment.