diff --git a/src/licensedcode/match.py b/src/licensedcode/match.py index 6bc0c99f6c..8b55832bd5 100644 --- a/src/licensedcode/match.py +++ b/src/licensedcode/match.py @@ -42,8 +42,8 @@ The filter functions are executed in a specific sequence over the list of matches. """ -TRACE = True -TRACE_MERGE = True +TRACE = False +TRACE_MERGE = False TRACE_REFINE = False TRACE_FILTER_FALSE_POSITIVE = False TRACE_FILTER_CONTAINED = False diff --git a/tests/formattedcode/data/common/manifests-expected.json b/tests/formattedcode/data/common/manifests-expected.json index af973084d5..3b149d1dad 100644 --- a/tests/formattedcode/data/common/manifests-expected.json +++ b/tests/formattedcode/data/common/manifests-expected.json @@ -325,7 +325,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "manifests/pypi/bluepyopt_setup.py", "start_line": 1, "end_line": 1, @@ -347,7 +347,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "manifests/pypi/bluepyopt_setup.py", "start_line": 1, "end_line": 1, diff --git a/tests/formattedcode/data/common/manifests-expected.jsonlines b/tests/formattedcode/data/common/manifests-expected.jsonlines index 5180027a3d..510b0d953a 100644 --- a/tests/formattedcode/data/common/manifests-expected.jsonlines +++ b/tests/formattedcode/data/common/manifests-expected.jsonlines @@ -20,11 +20,11 @@ "system_environment": { "operating_system": "linux", "cpu_architecture": "64", - "platform": "Linux-5.15.0-116-generic-x86_64-with-glibc2.35", - "platform_version": "#126-Ubuntu SMP Mon Jul 1 10:14:24 UTC 2024", - "python_version": "3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]" + "platform": "Linux-5.15.0-122-generic-x86_64-with-glibc2.35", + "platform_version": "#132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024", + "python_version": "3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0]" }, - "spdx_license_list_version": "3.24", + "spdx_license_list_version": "3.25", "files_count": 4 } } @@ -357,7 +357,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "manifests/pypi/bluepyopt_setup.py", "start_line": 1, "end_line": 1, @@ -379,7 +379,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "manifests/pypi/bluepyopt_setup.py", "start_line": 1, "end_line": 1, diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml index fdd3135709..11b0df2470 100644 --- a/tests/formattedcode/data/common/manifests-expected.yaml +++ b/tests/formattedcode/data/common/manifests-expected.yaml @@ -29,9 +29,9 @@ headers: system_environment: operating_system: linux cpu_architecture: 64 - platform: Linux-6.5.0-1025-oem-x86_64-with-glibc2.35 - platform_version: '#26-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 12:35:22 UTC 2024' - python_version: 3.11.8 (main, Feb 12 2024, 14:25:06) [GCC 11.4.0] + platform: Linux-5.15.0-122-generic-x86_64-with-glibc2.35 + platform_version: '#132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024' + python_version: 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] spdx_license_list_version: '3.25' files_count: 4 summary: @@ -340,7 +340,7 @@ packages: license_expression_spdx: LGPL-3.0-only matches: - license_expression: lgpl-3.0 - spdx_license_expression: LGPL-3.0-only + license_expression_spdx: LGPL-3.0-only from_file: manifests/pypi/bluepyopt_setup.py start_line: 1 end_line: 1 @@ -357,7 +357,7 @@ packages: license_expression_spdx: LGPL-3.0-only matches: - license_expression: lgpl-3.0 - spdx_license_expression: LGPL-3.0-only + license_expression_spdx: LGPL-3.0-only from_file: manifests/pypi/bluepyopt_setup.py start_line: 1 end_line: 1 diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml index 34902b9cc2..df176c3fa9 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml @@ -23,7 +23,7 @@ license_detections: GPL-2.0-or-later) matches: - license_expression: gpl-2.0-plus - spdx_license_expression: GPL-2.0-or-later + license_expression_spdx: GPL-2.0-or-later from_file: start_line: 210 end_line: 211 diff --git a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json index f800d293e2..9460193dc2 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json @@ -7674,7 +7674,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 2925, "end_line": 2925, @@ -7986,7 +7986,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3010, "end_line": 3010, @@ -8002,7 +8002,7 @@ }, { "license_expression": "other-permissive", - "spdx_license_expression": "LicenseRef-scancode-other-permissive", + "license_expression_spdx": "LicenseRef-scancode-other-permissive", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3010, "end_line": 3010, @@ -8026,7 +8026,7 @@ "matches": [ { "license_expression": "public-domain", - "spdx_license_expression": "LicenseRef-scancode-public-domain", + "license_expression_spdx": "LicenseRef-scancode-public-domain", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, @@ -8042,7 +8042,7 @@ }, { "license_expression": "bsd-original", - "spdx_license_expression": "BSD-4-Clause", + "license_expression_spdx": "BSD-4-Clause", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, @@ -8058,7 +8058,7 @@ }, { "license_expression": "gpl-1.0-plus", - "spdx_license_expression": "GPL-1.0-or-later", + "license_expression_spdx": "GPL-1.0-or-later", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, @@ -14402,7 +14402,7 @@ "matches": [ { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 2925, "end_line": 2925, @@ -14714,7 +14714,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3010, "end_line": 3010, @@ -14730,7 +14730,7 @@ }, { "license_expression": "other-permissive", - "spdx_license_expression": "LicenseRef-scancode-other-permissive", + "license_expression_spdx": "LicenseRef-scancode-other-permissive", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3010, "end_line": 3010, @@ -14754,7 +14754,7 @@ "matches": [ { "license_expression": "public-domain", - "spdx_license_expression": "LicenseRef-scancode-public-domain", + "license_expression_spdx": "LicenseRef-scancode-public-domain", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, @@ -14770,7 +14770,7 @@ }, { "license_expression": "bsd-original", - "spdx_license_expression": "BSD-4-Clause", + "license_expression_spdx": "BSD-4-Clause", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, @@ -14786,7 +14786,7 @@ }, { "license_expression": "gpl-1.0-plus", - "spdx_license_expression": "GPL-1.0-or-later", + "license_expression_spdx": "GPL-1.0-or-later", "from_file": "fusiondirectory/debian/copyright.in", "start_line": 3016, "end_line": 3016, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json index 0a5b83a4da..9a5bb900e9 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json @@ -1055,7 +1055,7 @@ }, { "license_expression": "apache-2.0", - "spdx_license_expression": "Apache-2.0", + "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/README_en.md", "start_line": 8, "end_line": 8, @@ -1640,7 +1640,7 @@ }, { "license_expression": "apache-2.0", - "spdx_license_expression": "Apache-2.0", + "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/README_en.md", "start_line": 8, "end_line": 8, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json index 845ada7898..0db0a27036 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json @@ -720,7 +720,7 @@ "matches": [ { "license_expression": "gpl-3.0", - "spdx_license_expression": "GPL-3.0-only", + "license_expression_spdx": "GPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -736,7 +736,7 @@ }, { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -752,7 +752,7 @@ }, { "license_expression": "gpl-2.0", - "spdx_license_expression": "GPL-2.0-only", + "license_expression_spdx": "GPL-2.0-only", "from_file": "samba/README.contributing", "start_line": 39, "end_line": 39, @@ -1116,7 +1116,7 @@ "matches": [ { "license_expression": "gpl-3.0", - "spdx_license_expression": "GPL-3.0-only", + "license_expression_spdx": "GPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1132,7 +1132,7 @@ }, { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1148,7 +1148,7 @@ }, { "license_expression": "gpl-2.0", - "spdx_license_expression": "GPL-2.0-only", + "license_expression_spdx": "GPL-2.0-only", "from_file": "samba/README.contributing", "start_line": 39, "end_line": 39, @@ -1500,7 +1500,7 @@ "matches": [ { "license_expression": "gpl-3.0", - "spdx_license_expression": "GPL-3.0-only", + "license_expression_spdx": "GPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1516,7 +1516,7 @@ }, { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1532,7 +1532,7 @@ }, { "license_expression": "gpl-2.0", - "spdx_license_expression": "GPL-2.0-only", + "license_expression_spdx": "GPL-2.0-only", "from_file": "samba/README.contributing", "start_line": 39, "end_line": 39, @@ -1893,7 +1893,7 @@ }, { "license_expression": "gpl-3.0", - "spdx_license_expression": "GPL-3.0-only", + "license_expression_spdx": "GPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1909,7 +1909,7 @@ }, { "license_expression": "lgpl-3.0", - "spdx_license_expression": "LGPL-3.0-only", + "license_expression_spdx": "LGPL-3.0-only", "from_file": "samba/README.contributing", "start_line": 38, "end_line": 38, @@ -1925,7 +1925,7 @@ }, { "license_expression": "gpl-2.0", - "spdx_license_expression": "GPL-2.0-only", + "license_expression_spdx": "GPL-2.0-only", "from_file": "samba/README.contributing", "start_line": 39, "end_line": 39, diff --git a/tests/packagedcode/data/npm/alias/package.json.expected b/tests/packagedcode/data/npm/alias/package.json.expected index 89bb0db8d8..77848f38b7 100755 --- a/tests/packagedcode/data/npm/alias/package.json.expected +++ b/tests/packagedcode/data/npm/alias/package.json.expected @@ -32,7 +32,7 @@ "matches": [ { "license_expression": "blueoak-1.0.0", - "spdx_license_expression": "BlueOak-1.0.0", + "license_expression_spdx": "BlueOak-1.0.0", "from_file": null, "start_line": 1, "end_line": 1, diff --git a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json index 6060198863..5b97d25d03 100644 --- a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json +++ b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json @@ -99,7 +99,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "cobe/website/package.json", "start_line": 1, "end_line": 1, @@ -4144,7 +4144,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "cobe/website/package.json", "start_line": 1, "end_line": 1, diff --git a/tests/packagedcode/data/npm/workspace/change-case.expected.json b/tests/packagedcode/data/npm/workspace/change-case.expected.json index 957fe4a185..775c9921e1 100644 --- a/tests/packagedcode/data/npm/workspace/change-case.expected.json +++ b/tests/packagedcode/data/npm/workspace/change-case.expected.json @@ -51,7 +51,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/change-case/package.json", "start_line": 1, "end_line": 1, @@ -140,7 +140,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/sponge-case/package.json", "start_line": 1, "end_line": 1, @@ -227,7 +227,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/swap-case/package.json", "start_line": 1, "end_line": 1, @@ -314,7 +314,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/title-case/package.json", "start_line": 1, "end_line": 1, @@ -515,7 +515,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/LICENSE", "start_line": 1, "end_line": 1, @@ -572,7 +572,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/LICENSE", "start_line": 1, "end_line": 1, @@ -754,7 +754,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/change-case/package.json", "start_line": 1, "end_line": 1, @@ -801,7 +801,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/change-case/package.json", "start_line": 24, "end_line": 24, @@ -890,7 +890,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/sponge-case/package.json", "start_line": 1, "end_line": 1, @@ -937,7 +937,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/sponge-case/package.json", "start_line": 24, "end_line": 24, @@ -1024,7 +1024,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/swap-case/package.json", "start_line": 1, "end_line": 1, @@ -1071,7 +1071,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/swap-case/package.json", "start_line": 22, "end_line": 22, @@ -1158,7 +1158,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/title-case/package.json", "start_line": 1, "end_line": 1, @@ -1205,7 +1205,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "change-case/packages/title-case/package.json", "start_line": 22, "end_line": 22, diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json index 66801f6ebe..d72f6a3b73 100644 --- a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json @@ -72,7 +72,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "bunkerweb/LICENSE.md", "start_line": 4, "end_line": 21, @@ -334,7 +334,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "bunkerweb/LICENSE.md", "start_line": 4, "end_line": 21, @@ -487,7 +487,7 @@ "matches": [ { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/COPYING.txt", "start_line": 4, "end_line": 29, @@ -501,7 +501,7 @@ }, { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/COPYING.txt", "start_line": 32, "end_line": 32, @@ -608,7 +608,7 @@ "matches": [ { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/setup.py", "start_line": 1, "end_line": 1, @@ -660,7 +660,7 @@ "matches": [ { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/setup.py", "start_line": 6, "end_line": 6, @@ -674,7 +674,7 @@ }, { "license_expression": "unknown-license-reference", - "spdx_license_expression": "LicenseRef-scancode-unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", "from_file": "bunkerweb/deps/libinjection/setup.py", "start_line": 6, "end_line": 6, @@ -688,7 +688,7 @@ }, { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/COPYING.txt", "start_line": 4, "end_line": 29, @@ -702,7 +702,7 @@ }, { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/COPYING.txt", "start_line": 32, "end_line": 32, @@ -726,7 +726,7 @@ "matches": [ { "license_expression": "bsd-new", - "spdx_license_expression": "BSD-3-Clause", + "license_expression_spdx": "BSD-3-Clause", "from_file": "bunkerweb/deps/libinjection/setup.py", "start_line": 41, "end_line": 41, @@ -831,7 +831,7 @@ "matches": [ { "license_expression": "mit", - "spdx_license_expression": "MIT", + "license_expression_spdx": "MIT", "from_file": "bunkerweb/LICENSE.md", "start_line": 4, "end_line": 21,