Skip to content

Commit a7cc2d5

Browse files
Merge branch 'develop' into add-license-dump-option
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents 5366e68 + ded56e9 commit a7cc2d5

File tree

640 files changed

+32501
-13581
lines changed

Some content is hidden

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

640 files changed

+32501
-13581
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: aboutcode

.github/workflows/about-files-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI About Files
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read # to fetch code (actions/checkout)
7+
58
jobs:
69
build:
710
runs-on: ubuntu-20.04

.github/workflows/docs-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI Documentation
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read # to fetch code (actions/checkout)
7+
58
jobs:
69
build:
710
runs-on: ubuntu-20.04

.github/workflows/scancode-release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ on:
1717
tags:
1818
- "v*.*.*"
1919

20+
permissions: {}
2021
jobs:
2122

2223
build_scancode_for_pypi:
24+
permissions:
25+
contents: read # to fetch code (actions/checkout)
26+
2327
name: Build PyPI archives
2428
runs-on: ubuntu-20.04
2529

@@ -67,6 +71,9 @@ jobs:
6771

6872

6973
build_scancode_for_release_linux:
74+
permissions:
75+
contents: read # to fetch code (actions/checkout)
76+
7077
name: Build Release for linux
7178
runs-on: ubuntu-20.04
7279
needs:
@@ -106,6 +113,9 @@ jobs:
106113

107114

108115
build_scancode_for_release_macos:
116+
permissions:
117+
contents: read # to fetch code (actions/checkout)
118+
109119
name: Build Release for mac
110120
runs-on: ubuntu-20.04
111121
needs:
@@ -145,6 +155,9 @@ jobs:
145155

146156

147157
build_scancode_for_release_windows:
158+
permissions:
159+
contents: read # to fetch code (actions/checkout)
160+
148161
name: Build Release for windows
149162
runs-on: ubuntu-20.04
150163
needs:
@@ -183,6 +196,9 @@ jobs:
183196

184197

185198
build_scancode_for_release_source:
199+
permissions:
200+
contents: read # to fetch code (actions/checkout)
201+
186202
name: Build source
187203
runs-on: ubuntu-20.04
188204
needs:
@@ -221,6 +237,9 @@ jobs:
221237

222238

223239
smoke_test_install_and_run_pypi_dists_posix:
240+
permissions:
241+
contents: read # to fetch code (actions/checkout)
242+
224243
name: Test POSIX PyPI wheels
225244
needs:
226245
- build_scancode_for_pypi
@@ -267,6 +286,9 @@ jobs:
267286
268287
269288
smoke_test_install_and_run_pypi_dists_windows:
289+
permissions:
290+
contents: read # to fetch code (actions/checkout)
291+
270292
name: Test Windows PyPI wheels
271293
needs:
272294
- build_scancode_for_pypi
@@ -312,6 +334,9 @@ jobs:
312334
313335
314336
smoke_test_install_and_run_app_archives_on_linux:
337+
permissions:
338+
contents: read # to fetch code (actions/checkout)
339+
315340
name: Test app on ${{ matrix.os }}
316341
needs:
317342
- build_scancode_for_release_linux
@@ -350,6 +375,9 @@ jobs:
350375
351376
352377
smoke_test_install_and_run_app_archives_on_macos:
378+
permissions:
379+
contents: read # to fetch code (actions/checkout)
380+
353381
name: Test app on ${{ matrix.os }}
354382
needs:
355383
- build_scancode_for_release_macos
@@ -388,6 +416,9 @@ jobs:
388416
389417
390418
smoke_test_install_and_run_app_archives_on_windows:
419+
permissions:
420+
contents: read # to fetch code (actions/checkout)
421+
391422
name: Test app on ${{ matrix.os }}
392423
needs:
393424
- build_scancode_for_release_windows
@@ -422,6 +453,9 @@ jobs:
422453
for %%F in (dist/*.zip) do python etc/release/scancode_release_tests.py dist/%%F
423454
424455
publish_to_gh_release:
456+
permissions:
457+
contents: write # to create GitHub release (softprops/action-gh-release)
458+
425459
name: Publish to GH Release
426460
needs:
427461
- smoke_test_install_and_run_app_archives_on_linux

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/src/*.egg-info
1212
*.egg-info
1313
!tests/packagedcode/data/pypi/source-package/pip-22.0.4/src/pip.egg-info
14+
!tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery/celery.egg-info
1415
/dist
1516
/build
1617
/bin

CHANGELOG.rst

+47
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,30 @@ Package detection:
1414
- OpenWRT packages.
1515
- Yocto/BitBake .bb recipes.
1616

17+
- Update ``GemfileLockParser`` to track the gem which the Gemfile.lock is for,
18+
which we assign to the new ``GemfileLockParser.primary_gem`` field. Update
19+
``GemfileLockHandler.parse()`` to handle the case where there is a primary gem
20+
detected from a gemfile.lock. If there is a primary gem, a single ``Package``
21+
is created and the detected gem data within the gemfile.lock are assigned as
22+
dependencies. If there is no primary gem, then all of the dependencies are
23+
collected into Package with no name and yielded.
24+
25+
https://github.com/nexB/scancode-toolkit/issues/3072
26+
27+
- Fix issue where dependencies were not reported when scanning an extracted
28+
Python project by modifying ``BaseExtractedPythonLayout.assemble()`` to favor
29+
using package data from a PKG-INFO file from an egg-info directory. Package
30+
data from a PKG-INFO file from an egg-info directory contains the dependency
31+
information collected from the requirements.txt file along side PKG-INFO.
32+
33+
https://github.com/nexB/scancode-toolkit/issues/3083
34+
35+
- Fix issue where we were returning incorrect purl package ``type`` for cocoapods.
36+
``pods`` was being returned as a purl type for cocoapods, it should be
37+
``cocoapods`` instead.
38+
https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#cocoapods
39+
40+
https://github.com/nexB/scancode-toolkit/issues/3081
1741

1842
License detection:
1943
~~~~~~~~~~~~~~~~~~~
@@ -30,6 +54,29 @@ License detection:
3054
detected license only once. This data can contain the reference license text
3155
as an option.
3256

57+
v31.2.1 - 2022-10-05
58+
----------------------------------
59+
60+
This is a minor release to fix a typo in a date.
61+
62+
63+
v31.2.0 - 2022-10-05
64+
----------------------------------
65+
66+
This is a minor release with small bug fixes and minor feature updates.
67+
68+
- Update SPDX license list to 3.18
69+
- Improve how we discard license matches that are "gibberish"
70+
- And new and improve existing license and license detection rules
71+
72+
73+
v31.1.1 - 2022-09-02
74+
----------------------------------
75+
76+
This is a minor release with a bug fix.
77+
78+
- Do not display tracing/debug outputs at runtime
79+
3380

3481

3582
v31.1.0 - 2022-08-29

ROADMAP.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,27 @@ even if it is correct and it is technically correct.
1818
The goal of this improvement is to:
1919

2020
- combine multiple related license matches in a single license detection
21+
2122
- in a license detection, expose a primary license expression in addition
2223
to the complete, full license expression.
24+
2325
- make the logic of selection of the primary license visible, at the minimum
2426
with a log of combination and primary license selection operations
2527

2628
This is for SCTK first.
2729

30+
Status: This has been completed in SCTK and also included in SCIO. We use
31+
an updated --summary option and a new license clarity score for this.
32+
Some work is still in progress as part of 3.) "detections"
33+
2834

2935
2. Package files.
3036
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3137

3238
Reporting the set of package files for each package instance is important because
33-
it allows for natural grouping of these in one unit.
39+
it allows for natural grouping of these in one unit.
40+
41+
This has been completed in SCTK and also included in SCIO.
3442

3543

3644
3. Go to two-level reporting of detections to provide more effective detections

conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import pytest
2222

23-
TRACE = True
23+
TRACE = False
2424

2525
"""
2626
A pytest conftest.py for scancode-toolkit to control which tests to run and when.

docs/scripts/sphinx_build_link_check.sh

100644100755
File mode changed.

docs/source/explanations/overview.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ ScanCode-Toolkit performs the scan on a codebase in the following steps :
2727

2828
Scan results are provided in various formats:
2929

30-
- a JSON file simple or pretty-printed,
31-
- SPDX tag value or XML, RDF formats,
32-
- CSV,
33-
- a simple unformatted HTML file that can be opened in browser or as a spreadsheet.
30+
* a JSON file simple or pretty-printed,
31+
* SPDX tag value or XML, RDF formats,
32+
* CSV,
33+
* a simple unformatted HTML file that can be opened in browser or as a spreadsheet.
3434

3535
For each scanned file, the result contains:
3636

37-
- its location in the codebase,
38-
- the detected licenses and copyright statements,
39-
- the start and end line numbers identifying where the license or copyright was found in the
37+
* its location in the codebase,
38+
* the detected licenses and copyright statements,
39+
* the start and end line numbers identifying where the license or copyright was found in the
4040
scanned file, and
41-
- reference information for the detected license.
41+
* reference information for the detected license.
4242

4343
For archive extraction, ScanCode uses a combination of Python modules, 7zip and libarchive/bsdtar
4444
to detect archive types and extract these recursively.

docs/source/misc/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Can I install ScanCode in a Unicode path?
6868
-----------------------------------------
6969

7070
Yes but but it is best to void this for now. See
71-
https://github.com/nexB/scancode- toolkit/issues/867
71+
https://github.com/nexB/scancode-toolkit/issues/867
7272

7373
There is a bug in virtualenv https://github.com/pypa/virtualenv/issues/457 that
7474
is now fixed but has not been extensively tested for ScanCode.

0 commit comments

Comments
 (0)