Skip to content

Commit b1ffe1b

Browse files
authored
Merge pull request #610 from nexB/feature/license-review-status
Todo flags, Checkbox & Filter for reviewing licenses, Auto-scroll to focus bug fixes
2 parents 75d98cc + f6fb74c commit b1ffe1b

File tree

102 files changed

+4272
-2086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4272
-2086
lines changed

ISSUE_TEMPLATE.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
### Description
2+
23
Please leave a brief discription of the bug or feature request:
3-
* if reporting a bug, tell us how to reproduce the issue.
4-
* Check the Develop Console tab and copy any error text there might be: https://scancode-workbench.readthedocs.io/en/latest/basics/check_for_errors_in_the_developer_tools.html
4+
5+
- if reporting a bug, tell us how to reproduce the issue.
6+
- Check the Develop Console tab and copy any error text there might be: https://scancode-workbench.readthedocs.io/en/latest/basics/check_for_errors_in_the_developer_tools.html
57

68
### System configuration
9+
710
For bug reports, it really helps us to know:
8-
* What OS are you running on? (Windows/MacOS/Linux)
9-
* What version of scancode-workbench are you running on?
10-
* What version of scancode-toolkit was used to generate the scan file?
11+
12+
- What OS are you running on? (Windows/MacOS/Linux)
13+
- What version of scancode-workbench are you running on?
14+
- What version of scancode-toolkit was used to generate the scan file?

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,46 @@
55
[![Release](https://github.com/nexB/scancode-workbench/actions/workflows/Release.yml/badge.svg)](https://github.com/nexB/scancode-workbench/actions/workflows/Release.yml)
66

77
ScanCode Workbench provides an advanced visual UI to help you quickly evaluate
8-
license and other notices identified by
8+
license and other notices identified by
99
[ScanCode](https://github.com/nexB/scancode-toolkit/).
10-
[ScanCode](https://github.com/nexB/scancode-toolkit/) detects licenses, copyrights
10+
[ScanCode](https://github.com/nexB/scancode-toolkit/) detects licenses, copyrights
1111
and other interesting information in your code.
1212

1313
ScanCode Workbench is based on
14-
[Electron](https://www.electronjs.org/) and will be the primary desktop/GUI tool
15-
for using nexB’s [AboutCode tools](https://github.com/nexB/aboutcode). This app
14+
[Electron](https://www.electronjs.org/) and will be the primary desktop/GUI tool
15+
for using nexB’s [AboutCode tools](https://github.com/nexB/aboutcode). This app
1616
works on Windows, macOS and Linux operating systems.
1717

1818
![ScanCode Workbench](/src/assets/images/workbench_intro.gif)
1919

2020
## Using
2121

22-
* You can [download the latest release](https://github.com/nexB/scancode-workbench/releases)
23-
for your operating system or build it yourself (see below). Once downloaded, you
24-
can find `ScanCode-Workbench` under `dist/ScanCode-Workbench-<os>-<arch>-<version>`
25-
* ScanCode Workbench >= v4 is only compatible with scans from
26-
[ScanCode v32.0.0](https://github.com/nexB/scancode-toolkit/releases) and
27-
above which are run with the ScanCode `-i` option. For a list of available ScanCode
28-
options see [How To: Set what will be detected in a scan](https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_set_what_will_be_detected_in_a_scan.html)
22+
- You can [download the latest release](https://github.com/nexB/scancode-workbench/releases)
23+
for your operating system or build it yourself (see below). Once downloaded, you
24+
can find `ScanCode-Workbench` under `dist/ScanCode-Workbench-<os>-<arch>-<version>`
25+
- ScanCode Workbench >= v4 is only compatible with scans from
26+
[ScanCode v32.0.0](https://github.com/nexB/scancode-toolkit/releases) and
27+
above which are run with the ScanCode `-i` option. For a list of available ScanCode
28+
options see [How To: Set what will be detected in a scan](https://scancode-toolkit.readthedocs.io/en/latest/tutorials/how_to_set_what_will_be_detected_in_a_scan.html)
2929

3030
```bash
3131
scancode -clipeu <input> <output_file>
3232
```
3333

34-
* We have provided a set of sample scans that you can quickly review in
35-
ScanCode Workbench in order to get a sense of its functionality and the types of
36-
information captured by a scan. The samples are located at
37-
[https://github.com/nexB/scancode-workbench/tree/develop/samples](https://github.com/nexB/scancode-workbench/tree/develop/samples).
38-
* Import a ScanCode JSON file, and see what components are in your software! See
39-
the [documentation](https://scancode-workbench.readthedocs.io) for more
40-
information on how to use ScanCode Workbench.
34+
- We have provided a set of sample scans that you can quickly review in
35+
ScanCode Workbench in order to get a sense of its functionality and the types of
36+
information captured by a scan. The samples are located at
37+
[https://github.com/nexB/scancode-workbench/tree/develop/samples](https://github.com/nexB/scancode-workbench/tree/develop/samples).
38+
- Import a ScanCode JSON file, and see what components are in your software! See
39+
the [documentation](https://scancode-workbench.readthedocs.io) for more
40+
information on how to use ScanCode Workbench.
4141

4242
[Import a JSON file](https://scancode-workbench.readthedocs.io/en/latest/how-to-guides/load-your-data/import-json.html)
4343

4444
## Running locally
4545

46-
You'll need [Node.js](https://nodejs.org) (which comes with [npm](http://npmjs.com))
47-
installed on your computer in order to build this app. For a list of platform
46+
You'll need [Node.js](https://nodejs.org) (which comes with [npm](http://npmjs.com))
47+
installed on your computer in order to build this app. For a list of platform
4848
specific requirements, see the Building section of the [documentation](https://scancode-workbench.readthedocs.io/en/latest/contribute/building.html).
4949
Then, from your command line:
5050

@@ -64,16 +64,16 @@ $ npm start
6464

6565
## Release Instructions
6666

67-
You'll need python 3.x to run the build. You can build a `dist` directory containing executables for your platform
67+
You'll need python 3.x to run the build. You can build a `dist` directory containing executables for your platform
6868

6969
Note: Due to usage of native modules, a build must be done on target platform only.
7070

7171
```bash
7272
$ npm run publish
7373
```
7474

75-
After building is done, you can find `ScanCode-Workbench` under
76-
`dist/ScanCode-Workbench-<os>-x64-<version>`. Archives (tar.gz and .zip) are
75+
After building is done, you can find `ScanCode-Workbench` under
76+
`dist/ScanCode-Workbench-<os>-x64-<version>`. Archives (tar.gz and .zip) are
7777
also built.
7878

7979
## Testing
@@ -86,8 +86,8 @@ $ npm test
8686

8787
## License
8888

89-
* Apache-2.0
90-
* Multiple licenses (LGPL, MIT, BSD, etc.) for third-party components.
89+
- Apache-2.0
90+
- Multiple licenses (LGPL, MIT, BSD, etc.) for third-party components.
9191

9292
See the NOTICE file for more details.
9393

Release.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Major changes
2+
23
- Ported to React + Typescript variant !!
3-
Under GSoC by @OmkarPh
4+
Under GSoC by @OmkarPh
45
- Support for scancode-toolkit v32.x output format v3.0.0
56
- Updated Tableview library & columns
67
- New sections: License Detections explorer, Packages explorer, ScanInfo, About
@@ -23,16 +24,18 @@
2324
- Updated documentation https://github.com/nexB/scancode-workbench/pull/602
2425

2526
## ScanCode Toolkit Compatibility
27+
2628
This v4.0.0 of ScanCode Workbench is compatible with scans from any [ScanCode Toolkit](https://github.com/nexB/scancode-toolkit/) releases at or after [`v32.0.0`](https://github.com/nexB/scancode-toolkit/releases/tag/v32.0.0rc4) and also from the latest develop, but using the latest `v32.x` stable releases is recommended: [latest SCTK release](https://github.com/nexB/scancode-toolkit/releases/latest).
2729

2830
## Bug fixes
31+
2932
- Prevent crashes on unsupported scans
3033
- Provision for header-less scans (Test scans)
3134
- Table column fixes
3235
- Fixed UI anomalies
3336
- Invalid path query fix (Data for files with similar prefix were colliding)
3437
- window title update & occasional sqlite error for packages https://github.com/nexB/scancode-workbench/pull/560
35-
- license detection parser issues, trimmed filter options, hide empty 'other dependencies' https://github.com/nexB/scancode-workbench/pull/569
38+
- license detection parser issues, trimmed filter options, hide empty 'other dependencies' https://github.com/nexB/scancode-workbench/pull/569
3639
- Refined UX including consistent scrollbars, tooltips, Search in licenses, filters for dependencies https://github.com/nexB/scancode-workbench/pull/587
3740
- Updated piechart tooltip https://github.com/nexB/scancode-workbench/pull/582
3841
- Automatic height for tables https://github.com/nexB/scancode-workbench/pull/606

archive_builder.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@
2424

2525
# Get scancode workbench version from package.json
2626
with open('package.json') as json_file:
27-
package_json_object = json.load(json_file)
28-
APP_VERSION = package_json_object['version']
27+
package_json_object = json.load(json_file)
28+
APP_VERSION = package_json_object['version']
2929

3030
# platform-specific properties
3131
ARCH = str(platform.machine())
3232
SYSTEM_PLATFORM = str(sys.platform).lower()
3333
on_linux = on_windows = on_mac = False
3434

35-
if 'linux' in SYSTEM_PLATFORM :
36-
PLATFORM_NAME = 'linux'
37-
PLATFORM = 'linux'
38-
on_linux = True
35+
if 'linux' in SYSTEM_PLATFORM:
36+
PLATFORM_NAME = 'linux'
37+
PLATFORM = 'linux'
38+
on_linux = True
3939

40-
elif 'win32' in SYSTEM_PLATFORM :
41-
PLATFORM_NAME = 'windows'
42-
PLATFORM = 'win32'
43-
on_windows = True
40+
elif 'win32' in SYSTEM_PLATFORM:
41+
PLATFORM_NAME = 'windows'
42+
PLATFORM = 'win32'
43+
on_windows = True
4444

45-
elif 'darwin' in SYSTEM_PLATFORM :
46-
PLATFORM_NAME = 'macos'
47-
PLATFORM = 'darwin'
48-
on_mac = True
45+
elif 'darwin' in SYSTEM_PLATFORM:
46+
PLATFORM_NAME = 'macos'
47+
PLATFORM = 'darwin'
48+
on_mac = True
4949

5050
else:
51-
raise Exception('Unsupported OS/platform %r' % SYSTEM_PLATFORM)
51+
raise Exception('Unsupported OS/platform %r' % SYSTEM_PLATFORM)
5252

5353
# Prepare file name for archive using platform, architecture & app version
5454
archive_file_name = '-'.join([APP_NAME, PLATFORM_NAME, ARCH, APP_VERSION])
@@ -61,16 +61,16 @@
6161

6262
# Prepare .zip file for windows
6363
if on_windows:
64-
zip_command = f"powershell Compress-Archive {PACKAGE_DIR}/* {ARCHIVE_DIR}/{archive_file_name}.zip"
65-
print("Executing zip command on powershell:", zip_command)
66-
os.system(zip_command)
67-
print(f"Zip file ready: {ARCHIVE_DIR}/{archive_file_name}.zip")
64+
zip_command = f"powershell Compress-Archive {PACKAGE_DIR}/* {ARCHIVE_DIR}/{archive_file_name}.zip"
65+
print("Executing zip command on powershell:", zip_command)
66+
os.system(zip_command)
67+
print(f"Zip file ready: {ARCHIVE_DIR}/{archive_file_name}.zip")
6868

6969
# Prepare .tar.gz file for mac & linux
7070
else:
71-
tar_command = f"tar -czf {ARCHIVE_DIR}/{archive_file_name}.tar.gz -C {PACKAGE_DIR} ."
72-
print("Executing tar command:", tar_command)
73-
os.system(tar_command)
74-
print(f"Tar file ready: {ARCHIVE_DIR}/{archive_file_name}.tar.gz")
71+
tar_command = f"tar -czf {ARCHIVE_DIR}/{archive_file_name}.tar.gz -C {PACKAGE_DIR} ."
72+
print("Executing tar command:", tar_command)
73+
os.system(tar_command)
74+
print(f"Tar file ready: {ARCHIVE_DIR}/{archive_file_name}.tar.gz")
7575

76-
print("Build succeeded !!!")
76+
print("Build succeeded !!!")

attribution.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,8 @@ <h2>About ScanCode Workbench 4.0.0:</h2>
5757
third-party licenses listed below.
5858
</p>
5959

60+
<pre> Copyright (c) nexB Inc. and others. All rights reserved.</pre>
6061
<pre>
61-
Copyright (c) nexB Inc. and others. All rights reserved.</pre
62-
>
63-
<pre>
6462
Software license
6563
================
6664

@@ -97,13 +95,14 @@ <h2>About ScanCode Workbench 4.0.0:</h2>
9795
Creative Commons CC0 1.0 Universal (CC0 1.0)
9896
Public Domain Dedication: http://creativecommons.org/publicdomain/zero/1.0/</pre>
9997

100-
<!-- <h2>ScanCode Workbench contains the following software components:</h2> -->
101-
<!-- <h3><a id="End">End</a></h3> -->
102-
103-
<h2>ScanCode Workbench contains the following image assets:</h2>
104-
Import file illustration - <a href="https://storyset.com/work">Work illustrations by Storyset</a>
98+
<!-- <h2>ScanCode Workbench contains the following software components:</h2> -->
99+
<!-- <h3><a id="End">End</a></h3> -->
105100

106-
<br/>
107-
<br/>
108-
</body>
101+
<h2>ScanCode Workbench contains the following image assets:</h2>
102+
Import file illustration -
103+
<a href="https://storyset.com/work">Work illustrations by Storyset</a>
104+
105+
<br />
106+
<br />
107+
</body>
109108
</html>

docs/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ Thumbs.db
4141

4242
# Editor backup files #
4343
#######################
44-
*~
44+
*~

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Documentation development
2+
23
The first step you want to do is create the python virtual environment:
4+
35
```
46
$ cd docs/
57
$ python3 -m venv venv
@@ -8,11 +10,13 @@ $ pip install -r requirements.txt
810
```
911

1012
Run Sphinx documentation server:
13+
1114
```
1215
$ make docs
1316
```
1417

1518
Build Sphinx documentation
19+
1620
```
1721
$ make html
1822
```

jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
22
module.exports = {
3-
preset: 'ts-jest',
4-
testEnvironment: 'node',
3+
preset: "ts-jest",
4+
testEnvironment: "node",
55
modulePathIgnorePatterns: ["test-old", "dist"],
6-
testPathIgnorePatterns: ["node_modules", "dist", "test-old"]
7-
};
6+
testPathIgnorePatterns: ["node_modules", "dist", "test-old"],
7+
};

packager.js

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
2-
const packager = require('electron-packager');
2+
const packager = require("electron-packager");
33

44
const ignoreDir = [
5-
'src', 'dist', 'samples', 'test-old',
6-
'.github', 'docs', 'test-db',
7-
'' // Required as the last element !!
8-
].join('*|');
5+
"src",
6+
"dist",
7+
"samples",
8+
"test-old",
9+
".github",
10+
"docs",
11+
"test-db",
12+
"", // Required as the last element !!
13+
].join("*|");
914
const ignoreFilesOrExtensions = [
10-
'rst', 'py', 'md', 'txt', 'enc', '.test.ts',
11-
'ABOUT', 'LICENSE', 'NOTICE',
12-
'.gitignore', '.eslintrc.json',
13-
'package-lock.json', 'electron-builder.json', 'tsconfig.json',
14-
].join('|');
15+
"rst",
16+
"py",
17+
"md",
18+
"txt",
19+
"enc",
20+
".test.ts",
21+
"ABOUT",
22+
"LICENSE",
23+
"NOTICE",
24+
".gitignore",
25+
".eslintrc.json",
26+
"package-lock.json",
27+
"electron-builder.json",
28+
"tsconfig.json",
29+
].join("|");
1530

1631
packager({
1732
dir: ".",
18-
out: 'out', // @NOTE - If 'out' dir is changed here, change PACKAGE_DIR in archive_builder too,
33+
out: "out", // @NOTE - If 'out' dir is changed here, change PACKAGE_DIR in archive_builder too,
1934
overwrite: true,
2035
icon: "src/assets/app-icon/icon",
2136
prune: true,
@@ -33,4 +48,4 @@ packager({
3348
// appleId: '[email protected]',
3449
// appleIdPassword: 'my-apple-id-password'
3550
// },
36-
});
51+
});

samples/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*.sqlite
1+
*.sqlite

0 commit comments

Comments
 (0)