Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if __name__ == "__main__":
setup(
name='fosslight_util',
version='1.4.43',
version='1.4.44',
package_dir={"": "src"},
packages=find_packages(where='src'),
description='FOSSLight Util',
Expand Down
4 changes: 2 additions & 2 deletions src/fosslight_util/oss_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_print_json(self):

json_item["version"] = self.version
if len(self.source_name_or_path) > 0:
json_item["source name or path"] = self.source_name_or_path
json_item["source path"] = self.source_name_or_path
if len(self.license) > 0:
json_item["license"] = self.license
if self.download_location != "":
Expand All @@ -217,7 +217,7 @@ def get_print_json(self):
if len(self.depends_on) > 0:
json_item["depends on"] = self.depends_on
if self.purl != "":
json_item["purl"] = self.purl
json_item["package url"] = self.purl

return json_item

Expand Down
3 changes: 2 additions & 1 deletion src/fosslight_util/parsing_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def set_value_switch(oss, key, value, yaml_file=""):
oss.download_location = value
elif key in ['license', 'license text']:
oss.license = value
elif key in ['file name or path', 'source name or path', 'file', 'binary name']:
elif key in ['file name or path', 'source name or path', 'source path',
'file', 'binary name', 'binary path']:
oss.source_name_or_path = value
elif key in ['copyright text', 'copyright']:
oss.copyright = value
Expand Down
2 changes: 2 additions & 0 deletions src/fosslight_util/read_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def read_oss_report(excel_file: str, sheet_names: str = "") -> List[OssItem]:
_item_idx = {
"ID": IDX_CANNOT_FOUND,
"Source Name or Path": IDX_CANNOT_FOUND,
"Source Path": IDX_CANNOT_FOUND,
"Binary Name": IDX_CANNOT_FOUND,
"Binary Path": IDX_CANNOT_FOUND,
"OSS Name": IDX_CANNOT_FOUND,
"OSS Version": IDX_CANNOT_FOUND,
"License": IDX_CANNOT_FOUND,
Expand Down
6 changes: 3 additions & 3 deletions src/fosslight_util/write_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
from jsonmerge import merge
from fosslight_util.cover import CoverItem

_HEADER = {'BIN (': ['ID', 'Binary Name', 'Source Code Path',
_HEADER = {'BIN (': ['ID', 'Binary Path', 'Source Code Path',
'NOTICE.html', 'OSS Name', 'OSS Version',
'License', 'Download Location', 'Homepage',
'Copyright Text', 'Exclude', 'Comment'],
'SRC': ['ID', 'Source Name or Path', 'OSS Name',
'SRC': ['ID', 'Source Path', 'OSS Name',
'OSS Version', 'License', 'Download Location',
'Homepage', 'Copyright Text', 'Exclude',
'Comment'],
'BIN': ['ID', 'Binary Name', 'OSS Name', 'OSS Version',
'BIN': ['ID', 'Binary Path', 'OSS Name', 'OSS Version',
'License', 'Download Location', 'Homepage',
'Copyright Text', 'Exclude', 'Comment']}
_OUTPUT_FILE_PREFIX = "FOSSLight-Report_"
Expand Down
2 changes: 1 addition & 1 deletion src/fosslight_util/write_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def create_yaml_with_ossitem(item, yaml_dict):
oss_info.get('homepage', '') == item.homepage and \
oss_info.get('download location', '') == item.download_location and \
oss_info.get('exclude', False) == item.exclude:
oss_info.get('source name or path', []).extend(item.source_name_or_path)
oss_info.get('source path', []).extend(item.source_name_or_path)
oss_info.pop('comment', None)
merged = True
break
Expand Down
2 changes: 1 addition & 1 deletion tests/test_excel_and_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():
'0.4.3', 'Apache-2.0', 'https://github.com/jpeddicord/askalono',
'', 'Copyright (c) 2018 Amazon.com, Inc. or its affiliates.',
'', '']]
sheet_items = [['ID', 'Binary Name', 'OSS Name', 'OSS Version',
sheet_items = [['ID', 'Binary Path', 'OSS Name', 'OSS Version',
'License', 'Download Location', 'Homepage',
'Copyright Text', 'Exclude', 'Comment'],
['dependency_unified.py', 'fosslight_dependency',
Expand Down