Skip to content

Commit 4ab936d

Browse files
authored
Merge pull request #15 from fosslight/develop
Change OSS report name to FOSSLight report
2 parents cd99415 + 13d7425 commit 4ab936d

File tree

7 files changed

+49
-39
lines changed

7 files changed

+49
-39
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SPDX-License-Identifier: Apache-2.0
44
-->
55
<p align='right'>
66
<a href="https://github.com/fosslight/fosslight_source/blob/main/docs/README_Kor.md">
7-
[Kor]
7+
[Korean]
88
</a>
99
</p>
1010

@@ -53,30 +53,30 @@ $ pip3 install fosslight_source
5353
There are two commands for FOSSLight Scanner.
5454

5555
### 1. fosslight_source
56-
After executing ScanCode, the source code scanner, print the OSS Report.
56+
After executing ScanCode, the source code scanner, print the FOSSLight Report.
5757

5858
| Parameter | Argument | Description |
5959
| ------------- | ------------- | ------------- |
6060
| h | None | Print help message. |
6161
| p | String | Path to detect source. |
62-
| j | None | As an output, the result of executing ScanCode in json format other than OSS Report is additionally generated. |
62+
| j | None | As an output, the result of executing ScanCode in json format other than FOSSLight Report is additionally generated. |
6363
| o | String | Output file name without file extension. |
6464

65-
#### Ex. Print result to OSS Report and json file
65+
#### Ex. Print result to FOSSLight Report and json file
6666
```
6767
$ fosslight_source -p /home/source_path -j
6868
```
6969

7070
### 2. fosslight_convert
71-
Converts the result of executing ScanCode in json format into OSS Report format.
71+
Converts the result of executing ScanCode in json format into FOSSLight Report format.
7272

7373
| Parameter | Argument | Description |
7474
| ------------- | ------------- | ------------- |
7575
| h | None | Print help message. |
7676
| p | String | Path of ScanCode json files. |
7777
| o | String | Output file name without file extension. |
7878

79-
#### Ex. Converting scancode json result to OSS report
79+
#### Ex. Converting scancode json result to FOSSLight report
8080
```
8181
$ fosslight_convert -p /home/jsonfile_dir
8282
```
@@ -86,14 +86,14 @@ $ fosslight_convert -p /home/jsonfile_dir
8686
```
8787
$ tree
8888
.
89-
├── OSS-Report_2021-05-03_00-39-49.csv
90-
├── OSS-Report_2021-05-03_00-39-49.xlsx
89+
├── FOSSLight-Report_2021-05-03_00-39-49.csv
90+
├── FOSSLight-Report_2021-05-03_00-39-49.xlsx
9191
├── scancode_2021-05-03_00-39-49.json
9292
└── fosslight_src_log_2021-05-03_00-39-49.txt
9393
9494
```
95-
- OSS-Report_[datetime].xlsx : FOSSLight Source result in OSS Report format.
96-
- OSS-Report_[datetime].csv : FOSSLight Source result in csv format. (Except Windows)
95+
- FOSSLight-Report_[datetime].xlsx : FOSSLight Source result in OSS Report format.
96+
- FOSSLight-Report_[datetime].csv : FOSSLight Source result in csv format. (Except Windows)
9797
- fosslight_src_log_[datetime].txt : The execution log.
9898
- scancode_[datetime].json : The ScanCode result in case of -j option.
9999

docs/README_Kor.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align='right'>
22
<a href="https://github.com/fosslight/fosslight_source/blob/main/README.md">
3-
[Eng]
3+
[English]
44
</a>
55
</p>
66

@@ -48,29 +48,29 @@ $ pip3 install fosslight_source
4848
FOSSLight Scanner에는 하기 두 가지 명령어가 있습니다.
4949

5050
### 1. fosslight_source
51-
Source Code 분석을 실행한 후 OSS Report 형식으로 출력합니다.
51+
Source Code 분석을 실행한 후 FOSSLight Report 형식으로 출력합니다.
5252

5353
| Parameter | Argument | Description |
5454
| ------------- | ------------- | ------------- |
5555
| h | None | Print help message. |
5656
| p | String | Path to analyze source. |
57-
| j | None | As an output, the result of executing ScanCode in json format other than OSS Report is additionally generated. |
57+
| j | None | As an output, the result of executing ScanCode in json format other than FOSSLight Report is additionally generated. |
5858
| o | String | Output file name without file extension. |
5959

60-
#### Ex. Source Code 분석 후 OSS Report와 json 형태의 ScanCode 결과 출력
60+
#### Ex. Source Code 분석 후 FOSSLight Report와 json 형태의 ScanCode 결과 출력
6161
```
6262
$ fosslight_source -p /home/source_path -j
6363
```
6464
### 2. fosslight_convert
65-
json형태인 ScanCode 결과를 OSS Report 형식으로 변환합니다.
65+
json형태인 ScanCode 결과를 FOSSLight Report 형식으로 변환합니다.
6666

6767
| Parameter | Argument | Description |
6868
| ------------- | ------------- | ------------- |
6969
| h | None | Print help message. |
7070
| p | String | Path of ScanCode json files. |
7171
| o | String | Output file name without file extension. |
7272

73-
#### Ex. json 형태의 ScanCode 결과를 OSS Report 형식으로 변환
73+
#### Ex. json 형태의 ScanCode 결과를 FOSSLight Report 형식으로 변환
7474
```
7575
$ fosslight_convert -p /home/jsonfile_dir
7676
```
@@ -80,14 +80,14 @@ $ fosslight_convert -p /home/jsonfile_dir
8080
```
8181
$ tree
8282
.
83-
├── OSS-Report_2021-05-03_00-39-49.csv
84-
├── OSS-Report_2021-05-03_00-39-49.xlsx
83+
├── FOSSLight-Report_2021-05-03_00-39-49.csv
84+
├── FOSSLight-Report_2021-05-03_00-39-49.xlsx
8585
├── scancode_2021-05-03_00-39-49.json
8686
└── fosslight_src_log_2021-05-03_00-39-49.txt
8787
8888
```
89-
- OSS-Report_[datetime].xlsx : OSS Report형태의 Source Code 분석 결과
90-
- OSS-Report_[datetime].csv : OSS Report를 csv로 출력한 결과 (Windows 제외)
89+
- FOSSLight-Report_[datetime].xlsx : FOSSLight Report형태의 Source Code 분석 결과
90+
- FOSSLight-Report_[datetime].csv : FOSSLight Report를 csv로 출력한 결과 (Windows 제외)
9191
- fosslight_src_log_[datetime].txt: 실행 로그가 저장된 파일
9292
- scancode_[datetime].json : ScanCode 실행 결과 (fosslight_source명령어에 -j 옵션이 포함된 경우에만 생성)
9393

src/fosslight_source/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_HELP_MESSAGE_CONVERT = """
2626
Usage: fosslight_convert [option1] <arg1> [option2] <arg2>...
2727
28-
FOSSLigtht_convert converts the result of executing ScanCode in json format into OSS Report format.
28+
FOSSLigtht_convert converts the result of executing ScanCode in json format into FOSSLight Report format.
2929
3030
Options:
3131
Mandatory

src/fosslight_source/convert_scancode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def convert_json_to_excel(scancode_json, excel_name):
5555
success_to_write, writing_msg = write_excel_and_csv(excel_name, sheet_list)
5656
logger.info("Writing excel :" + str(success_to_write) + " " + writing_msg)
5757
if success_to_write:
58-
_result_log["OSS Report"] = excel_name + ".xlsx"
58+
_result_log["FOSSLight Report"] = excel_name + ".xlsx"
5959

6060
except Exception as ex:
6161
success = False
@@ -112,7 +112,7 @@ def main():
112112

113113
if output_file_name == "":
114114
output_dir = os.getcwd()
115-
oss_report_name = "OSS-Report_" + start_time
115+
oss_report_name = "FOSSLight-Report_" + start_time
116116
else:
117117
oss_report_name = output_file_name
118118
output_dir = os.path.dirname(os.path.abspath(output_file_name))

src/fosslight_source/run_scancode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run_scan(path_to_scan, output_file_name="",
6868
start_time = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
6969

7070
if output_file_name == "":
71-
output_file = "OSS-Report_" + start_time
71+
output_file = "FOSSLight-Report_" + start_time
7272
output_json_file = "scancode_" + start_time
7373
output_dir = os.getcwd()
7474
else:
@@ -125,7 +125,7 @@ def run_scan(path_to_scan, output_file_name="",
125125
output_file, sheet_list)
126126
logger.info("Writing excel :" + str(success_to_write) + " " + writing_msg)
127127
if success_to_write:
128-
_result_log["OSS Report"] = output_file + ".xlsx"
128+
_result_log["FOSSLight Report"] = output_file + ".xlsx"
129129
except Exception as ex:
130130
success = False
131131
msg = str(ex)

tests/cli_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ def main():
2020
start_time = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
2121
output_file_name = ""
2222

23-
oss_report_name = "test_result_func_call/result"
23+
fosslight_report_name = "test_result_func_call/result"
2424
output_dir = os.path.dirname(os.path.abspath(output_file_name))
2525

2626
logger = init_log(os.path.join(output_dir, "fosslight_src_log_"+start_time+".txt"))
2727

28-
ret = run_scan(path_to_find_bin, oss_report_name, True, -1, True)
28+
ret = run_scan(path_to_find_bin, fosslight_report_name, True, -1, True)
2929

3030
logger.warn("[Scan] Result: %s" % (ret[0]))
3131
logger.warn("[Scan] Result_msg: %s" % (ret[1]))

tox.ini

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ skipdist = true
88
install_command = pip install {opts} {packages}
99
basepython= python3.6
1010
whitelist_externals = cat
11+
setenv =
12+
PYTHONPATH=.
1113

1214
[flake8]
1315
max-line-length = 130
@@ -18,18 +20,26 @@ filterwarnings = ignore::DeprecationWarning
1820

1921
[testenv:test_run]
2022
deps =
21-
-r{toxinidir}/requirements-dev.txt
23+
-r{toxinidir}/requirements.txt
24+
commands =
25+
fosslight_source -p tests/test_files -j -o test_scan/scan_result
26+
cat test_scan/scan_result.csv
27+
fosslight_convert -p tests/json_result/scan_has_error.json -o test_convert/convert_result2
28+
fosslight_convert -p test_scan/scan_result.json -o test_convert/convert_result
29+
cat test_convert/convert_result.csv
30+
python tests/cli_test.py
2231

23-
setenv =
24-
PYTHONPATH=.
32+
[testenv:release]
33+
deps =
34+
-r{toxinidir}/requirements-dev.txt
2535

2636
commands =
27-
fosslight_source -h
28-
fosslight_convert -h
29-
fosslight_source -p tests/test_files -j -o test_scan/scan_result
30-
cat test_scan/scan_result.csv
31-
fosslight_convert -p tests/json_result/scan_has_error.json -o test_convert/convert_result2
32-
fosslight_convert -p test_scan/scan_result.json -o test_convert/convert_result
33-
cat test_convert/convert_result.csv
34-
python tests/cli_test.py
35-
pytest -v --flake8
37+
fosslight_source -h
38+
fosslight_convert -h
39+
fosslight_source -p tests/test_files -j -o test_scan/scan_result
40+
cat test_scan/scan_result.csv
41+
fosslight_convert -p tests/json_result/scan_has_error.json -o test_convert/convert_result2
42+
fosslight_convert -p test_scan/scan_result.json -o test_convert/convert_result
43+
cat test_convert/convert_result.csv
44+
python tests/cli_test.py
45+
pytest -v --flake8

0 commit comments

Comments
 (0)