Skip to content

Commit 3caea56

Browse files
authored
Merge pull request #2914 from nexB/update-summary-plugin
Update summary plugin
2 parents 8ce918e + e9df507 commit 3caea56

File tree

370 files changed

+8412
-18808
lines changed

Some content is hidden

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

370 files changed

+8412
-18808
lines changed

CHANGELOG.rst

Lines changed: 27 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Important API changes:
3030
return "package_data" package information at the manifest file-level
3131
rather than "packages". This has all the data attributes of a "package_data"
3232
field plus others: "package_uuid", "package_data_files" and "files".
33-
33+
3434
- There is a a new top-level "packages" attribute that contains package
3535
instances that can be aggregating data from multiple manifests.
3636

@@ -47,6 +47,14 @@ Important API changes:
4747
- The data structure for CSV output has been changed to rename the Resource
4848
column to "path". The "copyright_holder" has been ranmed to "holder"
4949

50+
- The license clarity scoring plugin has been overhauled to show new license
51+
clarity criteria. More details of the new criteria are provided below.
52+
53+
- The functionality of the summary plugin has been changed to provide declared
54+
origin information for the codebase being scanned. The previous summary plugin
55+
functionality has been preserved in the new ``tallies`` plugin. More details
56+
are provided below.
57+
5058

5159
Copyright detection:
5260
~~~~~~~~~~~~~~~~~~~~
@@ -142,7 +150,7 @@ Package detection:
142150
as these are really package data that are being detected, and can be manifests,
143151
lockfiles or other package data. This has all the data attributes of a `package_data`
144152
field plus others: `package_uuid`, `package_data_files` and `files`.
145-
153+
146154

147155
- A new top-level attribute `packages` has been added which contains package
148156
instances created from `package_data` detected in the codebase.
@@ -156,7 +164,7 @@ Package detection:
156164

157165
- There is a new resource-level attribute `for_packages` which refers to packages
158166
through package_uuids (pURL + uuid string).
159-
167+
160168
- The package_data attribute `dependencies` (which is a list of DependentPackages),
161169
now has a new attribute `resolved_package` having a package data mapping.
162170
Also the `requirement` attribute here is renamed to `extracted_requirement`.
@@ -222,64 +230,20 @@ License Clarity Scoring Update
222230
- Scoring Weight = -20
223231

224232

225-
License Clarity Scoring Update
226-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227-
228-
- We are moving away from the license clarity scoring defined by ClearlyDefined
229-
in the license clarity score plugin. The previous license clarity scoring
230-
logic produced a score that was misleading, where it would return a low score
231-
when scanning packages due to the stringent scoring criteria. We are now
232-
using more general criteria to get a sense of what provenance information has
233-
been provided and whether or not there is a conflict in licensing between
234-
what licenses were declared at the top-level key files and what licenses have
235-
been detected in the files under the top-level.
236-
237-
- The license clarity score is a value from 0-100 calculated by combining the
238-
weighted values determined for each of the scoring elements:
239-
240-
- Declared license:
241-
242-
- When true, indicates that the software package licensing is documented at
243-
top-level or well-known locations in the software project, typically in a
244-
package manifest, NOTICE, LICENSE, COPYING or README file.
245-
- Scoring Weight = 40
246-
247-
- Identification precision:
248-
249-
- Indicates how well the license statement(s) of the software identify known
250-
licenses that can be designated by precise keys (identifiers) as provided in
251-
a publicly available license list, such as the ScanCode LicenseDB, the SPDX
252-
license list, the OSI license list, or a URL pointing to a specific license
253-
text in a project or organization website.
254-
- Scoring Weight = 40
255-
256-
- License texts:
257-
258-
- License texts are provided to support the declared license expression in
259-
files such as a package manifest, NOTICE, LICENSE, COPYING or README.
260-
- Scoring Weight = 10
261-
262-
- Declared copyright:
263-
264-
- When true, indicates that the software package copyright is documented at
265-
top-level or well-known locations in the software project, typically in a
266-
package manifest, NOTICE, LICENSE, COPYING or README file.
267-
- Scoring Weight = 10
268-
269-
- Ambiguous compound licensing:
270-
271-
- When true, indicates that the software has a license declaration that
272-
makes it difficult to construct a reliable license expression, such as in
273-
the case of multiple licenses where the conjunctive versus disjunctive
274-
relationship is not well defined.
275-
- Scoring Weight = -10
276-
277-
- Conflicting license categories:
233+
Summary Plugin Update
234+
~~~~~~~~~~~~~~~~~~~~~
235+
The summary plugin's behavior has been changed. Previously, it provided a count
236+
of the detected license expressions, copyrights, holders, authors, and
237+
programming languages from a scan. We have preserved this functionality by
238+
creating a new plugin called ``tallies``. All functionality of the previous
239+
summary plugin have been preserved in the tallies plugin.
278240

279-
- When true, indicates the declared license expression of the software is in
280-
the permissive category, but that other potentially conflicting categories,
281-
such as copyleft and proprietary, have been detected in lower level code.
282-
- Scoring Weight = -20
241+
The plugin now attempts to determine a declared license expression, holder, and
242+
primary programming language from a scan. The license clarity score is provided
243+
context on what origin information is provided from key files. It also returns
244+
lists of tallies of the other detected license expressions, holders, and
245+
programming languages. All information is provided in the codebase level
246+
attribute named ``summary``.
283247

284248

285249
Outputs:
@@ -288,6 +252,9 @@ Outputs:
288252
- Add new outputs for the CycloneDx format.
289253
The CLI now exposes options to produce CycloneDx BOMs in either JSON or XML format
290254

255+
- A new field ``warnings`` has been added to the headers of ScanCode toolkit output
256+
that contains any warning messages that occur during a scan.
257+
291258

292259
Output version
293260
--------------

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ scancode_scan =
177177
# module for details and doc.
178178
scancode_post_scan =
179179
summary = summarycode.summarizer:ScanSummary
180-
summary2 = summarycode.summarizer2:ScanSummary
181-
summary-keeping-details = summarycode.summarizer:ScanSummaryWithDetails
182-
summary-key-files = summarycode.summarizer:ScanKeyFilesSummary
183-
summary-by-facet = summarycode.summarizer:ScanByFacetSummary
180+
tallies = summarycode.tallies:Tallies
181+
tallies-with-details = summarycode.tallies:TalliesWithDetails
182+
tallies-key-files = summarycode.tallies:KeyFilesTallies
183+
tallies-by-facet = summarycode.tallies:FacetTallies
184184
license-clarity-score = summarycode.score:LicenseClarityScore
185185
license-policy = licensedcode.plugin_license_policy:LicensePolicy
186186
mark-source = scancode.plugin_mark_source:MarkSource

src/licensedcode/data/licenses/4suite-1.1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ spdx_license_key: LicenseRef-scancode-4suite-1.1
77
ignorable_copyrights:
88
- Copyright (c) 2000 Fourthought, Inc.
99
- Copyright (c) 2000 The Apache Software Foundation
10-
ignorable_authors:
11-
- Fourthought, Inc. (http://www.fourthought.com)
1210
ignorable_holders:
1311
- Fourthought, Inc.
1412
- The Apache Software Foundation
13+
ignorable_authors:
14+
- Fourthought, Inc. (http://www.fourthought.com)
1515
ignorable_urls:
1616
- http://www.fourthought.com/
1717
ignorable_emails:

src/licensedcode/data/licenses/accellera-systemc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ ignorable_copyrights:
1010
- (c) 1996- current year here
1111
- (c) 1996- current year here by all Contributors
1212
- Copyright (c) 1996- current year here by all Contributors
13-
ignorable_authors:
14-
- through the Accellera working group process
1513
ignorable_holders:
1614
- here
1715
- here by all Contributors
16+
ignorable_authors:
17+
- through the Accellera working group process
1818
ignorable_urls:
1919
- http://www.accellera.org/
2020
ignorable_emails:

src/licensedcode/data/licenses/ace-tao.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ minimum_coverage: 30
1313
ignorable_copyrights:
1414
- copyrighted by Douglas C. Schmidt and his research group at Washington University, University
1515
of California, Irvine, and Vanderbilt University, Copyright (c) 1993-2009
16-
ignorable_authors:
17-
- the DOC Group at the Institute for Software Integrated Systems (ISIS) and the Center
1816
ignorable_holders:
1917
- Douglas C. Schmidt and his research group at Washington University, University of California,
2018
Irvine, and Vanderbilt University
19+
ignorable_authors:
20+
- the DOC Group at the Institute for Software Integrated Systems (ISIS) and the Center

src/licensedcode/data/licenses/acroname-bdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ ignorable_holders:
1212
ignorable_urls:
1313
- https://libusb.info/
1414
ignorable_emails:
15-
15+

src/licensedcode/data/licenses/adapt-1.0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ owner: OSI - Open Source Initiative
66
homepage_url: http://www.opensource.org/licenses/apl1.0.php
77
notes: Per SPDX.org, this license is OSI certified.
88
spdx_license_key: APL-1.0
9+
osi_license_key: APL-1.0
910
text_urls:
1011
- http://www.opensource.org/licenses/apl1.0.php
1112
osi_url: http://www.opensource.org/licenses/apl1.0.php
1213
other_urls:
1314
- http://www.opensource.org/licenses/APL-1.0
1415
- https://opensource.org/licenses/APL-1.0
15-
osi_license_key: APL-1.0

0 commit comments

Comments
 (0)