diff --git a/src/packagedcode/models.py b/src/packagedcode/models.py index 26c6b6d0c8c..86980158003 100644 --- a/src/packagedcode/models.py +++ b/src/packagedcode/models.py @@ -1186,7 +1186,7 @@ def assign_package_to_resources(cls, package, resource, codebase, package_adder= starting ``resource`` in the ``codebase``. This default implementation assigns the package to the whole - ``resource`` tree. Since ``resource`` is a file y default, this means + ``resource`` tree. Since ``resource`` is a file by default, this means that only the datafile ``resource`` is assigned to the ``package`` by default. diff --git a/src/packagedcode/pypi.py b/src/packagedcode/pypi.py index dcfe261d946..fec8575372e 100644 --- a/src/packagedcode/pypi.py +++ b/src/packagedcode/pypi.py @@ -18,6 +18,7 @@ import tempfile import zipfile from configparser import ConfigParser +from fnmatch import fnmatchcase from pathlib import Path from typing import NamedTuple @@ -83,6 +84,10 @@ class PythonEggPkgInfoFile(models.DatafileHandler): @classmethod def parse(cls, location, package_only=False): + """ + Parse package data from a PKG-INFO file and other manifests present in + neighboring files as needed when an installed layout is found. + """ yield parse_metadata( location=location, datasource_id=cls.datasource_id, @@ -108,6 +113,10 @@ class PythonEditableInstallationPkgInfoFile(models.DatafileHandler): @classmethod def parse(cls, location, package_only=False): + """ + Parse package data from a PKG-INFO file and other manifests present in + neighboring files as needed when an installed layout is found. + """ yield parse_metadata( location=location, datasource_id=cls.datasource_id, @@ -150,12 +159,11 @@ class BaseExtractedPythonLayout(models.DatafileHandler): def assemble(cls, package_data, resource, codebase, package_adder): # a source distribution can have many manifests datafile_name_patterns = ( - 'Pipfile.lock', - 'Pipfile', - ) + PipRequirementsFileHandler.path_patterns + PyprojectTomlHandler.path_patterns + PipfileHandler.path_patterns + PipfileLockHandler.path_patterns + + PipRequirementsFileHandler.path_patterns + PyprojectTomlHandler.path_patterns + ) - # TODO: we want PKG-INFO first, then (setup.py, setup.cfg), then pyproject.toml for poetry - # then we have the rest of the lock files (pipfile, pipfile.lock, etc.) + is_datafile_pypi = any(fnmatchcase(resource.path, pat) for pat in datafile_name_patterns) package_resource = None if resource.name == 'PKG-INFO': @@ -186,18 +194,21 @@ def assemble(cls, package_data, resource, codebase, package_adder): continue package_resource = child break - elif resource.name in datafile_name_patterns: + + elif is_datafile_pypi: if resource.has_parent(): siblings = resource.siblings(codebase) - package_resource = [r for r in siblings if r.name == 'PKG-INFO'] + package_resources = [r for r in siblings if r.name == 'PKG-INFO'] if package_resource: - package_resource = package_resource[0] + package_resource = package_resources[0] package = None if package_resource: pkg_data = package_resource.package_data[0] pkg_data = models.PackageData.from_dict(pkg_data) if pkg_data.purl: + # We yield only the package and the resource, and not dependencies because + # PKG-INFO also has the dependencies from package = create_package_from_package_data( package_data=pkg_data, datafile_path=package_resource.path @@ -207,11 +218,6 @@ def assemble(cls, package_data, resource, codebase, package_adder): package_adder(package.package_uid, package_resource, codebase) yield package_resource - yield from yield_dependencies_from_package_data( - package_data=pkg_data, - datafile_path=package_resource.path, - package_uid=package.package_uid - ) else: setup_resources = [] if resource.has_parent(): @@ -221,31 +227,50 @@ def assemble(cls, package_data, resource, codebase, package_adder): if r.name in ('setup.py', 'setup.cfg') and r.package_data ] - - setup_package_data = [ - (setup_resource, models.PackageData.from_dict(setup_resource.package_data[0])) - for setup_resource in setup_resources - ] - setup_package_data = sorted(setup_package_data, key=lambda s: bool(s[1].purl), reverse=True) - for setup_resource, setup_pkg_data in setup_package_data: - if setup_pkg_data.purl: - if not package: - package = create_package_from_package_data( + if setup_resources: + setup_package_data = [ + (setup_resource, models.PackageData.from_dict(setup_resource.package_data[0])) + for setup_resource in setup_resources + ] + setup_package_data = sorted(setup_package_data, key=lambda s: bool(s[1].purl), reverse=True) + for setup_resource, setup_pkg_data in setup_package_data: + if setup_pkg_data.purl: + if not package: + package = create_package_from_package_data( + package_data=setup_pkg_data, + datafile_path=setup_resource.path, + ) + yield package + package_resource = setup_resource + else: + package.update(setup_pkg_data, setup_resource.path) + if package: + for setup_resource, setup_pkg_data in setup_package_data: + package_adder(package.package_uid, setup_resource, codebase) + yield setup_resource + + yield from yield_dependencies_from_package_data( package_data=setup_pkg_data, datafile_path=setup_resource.path, + package_uid=package.package_uid ) - yield package - package_resource = setup_resource - else: - package.update(setup_pkg_data, setup_resource.path) - if package: - for setup_resource, setup_pkg_data in setup_package_data: - package_adder(package.package_uid, setup_resource, codebase) - yield setup_resource + else: + package_resource = resource + pkg_data = package_resource.package_data[0] + pkg_data = models.PackageData.from_dict(pkg_data) + if pkg_data.purl: + package = create_package_from_package_data( + package_data=pkg_data, + datafile_path=package_resource.path + ) + yield package + + package_adder(package.package_uid, package_resource, codebase) + yield package_resource yield from yield_dependencies_from_package_data( - package_data=setup_pkg_data, - datafile_path=setup_resource.path, + package_data=pkg_data, + datafile_path=package_resource.path, package_uid=package.package_uid ) @@ -275,12 +300,20 @@ def assemble(cls, package_data, resource, codebase, package_adder): else: package_uid = None + # Yield dependencies from sibling manifests if package_resource: for sibling in package_resource.siblings(codebase): - if sibling and sibling.name in datafile_name_patterns: + if not sibling: + continue + + is_sibling_pypi_manifest = any( + fnmatchcase(sibling.path, pat) + for pat in datafile_name_patterns + ) + if is_sibling_pypi_manifest: yield from yield_dependencies_from_package_resource( resource=sibling, - package_uid=package_uid + package_uid=package_uid, ) if package_uid and package_uid not in sibling.for_packages: @@ -981,6 +1014,10 @@ def parse_metadata(location, datasource_id, package_type, package_only=False): if license_file: extra_data['license_file'] = license_file + # FIXME: We are getting dependencies from other sibling files, this is duplicated + # data at the package_data level, is this necessary? We also have the entire dependency + # relationships here at requires.txt present in ``.egg-info`` should we store these + # nicely? dependencies = get_dist_dependencies(dist) file_references = list(get_file_references(dist)) @@ -1240,6 +1277,8 @@ def parse(cls, location, package_only=False): with open(location) as f: parser.read_file(f) + extra_data = {} + for section in parser.values(): if section.name == 'options': scope_by_sub_section = { @@ -1255,22 +1294,10 @@ def parse(cls, location, package_only=False): reqs = list(get_requirement_from_section(section=section, sub_section=sub_section)) dependent_packages.extend(cls.parse_reqs(reqs, scope)) continue + + # This is not a dependency, merely a required python version python_requires_specifier = section[sub_section] - purl = PackageURL( - type="generic", - name="python", - ) - resolved_purl = get_resolved_purl(purl=purl, specifiers=SpecifierSet(python_requires_specifier)) - dependent_packages.append( - models.DependentPackage( - purl=str(resolved_purl.purl), - scope=scope, - is_runtime=True, - is_optional=False, - is_resolved=resolved_purl.is_resolved, - extracted_requirement=f"python_requires{python_requires_specifier}", - ) - ) + extra_data["python_requires"] = python_requires_specifier if section.name == "options.extras_require": for sub_section in section: diff --git a/tests/formattedcode/data/common/manifests-expected.json b/tests/formattedcode/data/common/manifests-expected.json index 730bafeb8ae..aaaba0440fd 100644 --- a/tests/formattedcode/data/common/manifests-expected.json +++ b/tests/formattedcode/data/common/manifests-expected.json @@ -273,6 +273,117 @@ "npm_package_json" ], "purl": "pkg:npm/angular-compare-validator@0.1.1" + }, + { + "type": "pypi", + "namespace": null, + "name": "bluepyopt", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Bluebrain Python Optimisation Library (bluepyopt)", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "BlueBrain Project, EPFL", + "email": "werner.vangeit@epfl.ch", + "url": null + } + ], + "keywords": [ + "optimisation", + "neuroscience", + "BlueBrainProject", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Programming Language :: Python :: 3 :: Only", + "Operating System :: POSIX", + "Topic :: Scientific/Engineering", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/BlueBrain/BluePyOpt", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "lgpl-3.0", + "declared_license_expression_spdx": "LGPL-3.0-only", + "license_detections": [ + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ], + "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 10, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": "- 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'" + } + ], + "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: LGPLv3\nclassifiers:\n - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/bluepyopt", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/bluepyopt/json", + "package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "manifests/pypi/bluepyopt_setup.py" + ], + "datasource_ids": [ + "pypi_setup_py" + ], + "purl": "pkg:pypi/bluepyopt" } ], "dependencies": [ @@ -500,6 +611,171 @@ "for_package_uid": "pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "manifests/npm-license-string/package.json", "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:pypi/numpy", + "extracted_requirement": ">=1.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pandas", + "extracted_requirement": ">=0.18", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/deap", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/efel", + "extracted_requirement": ">=2.13", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/ipyparallel", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pickleshare", + "extracted_requirement": ">=0.7.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jinja2", + "extracted_requirement": ">=2.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/future", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pebble", + "extracted_requirement": ">=4.3.10", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "all", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "scoop", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" } ], "license_detections": [ @@ -1822,7 +2098,9 @@ "purl": "pkg:pypi/bluepyopt" } ], - "for_packages": [], + "for_packages": [ + "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "lgpl-3.0", "detected_license_expression_spdx": "LGPL-3.0-only", "license_detections": [ diff --git a/tests/formattedcode/data/common/manifests-expected.jsonlines b/tests/formattedcode/data/common/manifests-expected.jsonlines index 960021483b9..8bc764b159c 100644 --- a/tests/formattedcode/data/common/manifests-expected.jsonlines +++ b/tests/formattedcode/data/common/manifests-expected.jsonlines @@ -20,9 +20,9 @@ "system_environment": { "operating_system": "linux", "cpu_architecture": "64", - "platform": "Linux-5.15.0-112-generic-x86_64-with-glibc2.35", - "platform_version": "#122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024", - "python_version": "3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]" + "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]" }, "spdx_license_list_version": "3.24", "files_count": 4 @@ -305,6 +305,117 @@ "npm_package_json" ], "purl": "pkg:npm/angular-compare-validator@0.1.1" + }, + { + "type": "pypi", + "namespace": null, + "name": "bluepyopt", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Bluebrain Python Optimisation Library (bluepyopt)", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "BlueBrain Project, EPFL", + "email": "werner.vangeit@epfl.ch", + "url": null + } + ], + "keywords": [ + "optimisation", + "neuroscience", + "BlueBrainProject", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Programming Language :: Python :: 3 :: Only", + "Operating System :: POSIX", + "Topic :: Scientific/Engineering", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/BlueBrain/BluePyOpt", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "lgpl-3.0", + "declared_license_expression_spdx": "LGPL-3.0-only", + "license_detections": [ + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ], + "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 10, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": "- 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'" + } + ], + "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: LGPLv3\nclassifiers:\n - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/bluepyopt", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/bluepyopt/json", + "package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "manifests/pypi/bluepyopt_setup.py" + ], + "datasource_ids": [ + "pypi_setup_py" + ], + "purl": "pkg:pypi/bluepyopt" } ] }, @@ -534,6 +645,171 @@ "for_package_uid": "pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "manifests/npm-license-string/package.json", "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:pypi/numpy", + "extracted_requirement": ">=1.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pandas", + "extracted_requirement": ">=0.18", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/deap", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/efel", + "extracted_requirement": ">=2.13", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/ipyparallel", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pickleshare", + "extracted_requirement": ">=0.7.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jinja2", + "extracted_requirement": ">=2.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/future", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pebble", + "extracted_requirement": ">=4.3.10", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "all", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "scoop", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" } ] }, @@ -1892,7 +2168,9 @@ "purl": "pkg:pypi/bluepyopt" } ], - "for_packages": [], + "for_packages": [ + "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "lgpl-3.0", "detected_license_expression_spdx": "LGPL-3.0-only", "license_detections": [ diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml index 5b74788a162..74f74b17eee 100644 --- a/tests/formattedcode/data/common/manifests-expected.yaml +++ b/tests/formattedcode/data/common/manifests-expected.yaml @@ -29,13 +29,13 @@ headers: system_environment: operating_system: linux cpu_architecture: 64 - platform: Linux-5.15.0-112-generic-x86_64-with-glibc2.35 - platform_version: '#122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024' - python_version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] + 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] spdx_license_list_version: '3.24' files_count: 4 summary: - declared_license_expression: apache-2.0 AND cddl-1.0 AND mit + declared_license_expression: apache-2.0 AND cddl-1.0 AND lgpl-3.0 AND mit license_clarity_score: score: '0' declared_license: no @@ -44,7 +44,7 @@ summary: declared_copyrights: no conflicting_license_categories: no ambiguous_compound_licensing: yes - declared_holder: + declared_holder: EPFL/Blue Brain Project primary_language: Python other_license_expressions: - value: lgpl-3.0 @@ -58,8 +58,6 @@ summary: other_holders: - value: count: 3 - - value: EPFL/Blue Brain Project - count: 1 other_languages: [] packages: - type: maven @@ -298,6 +296,102 @@ packages: datasource_ids: - npm_package_json purl: pkg:npm/angular-compare-validator@0.1.1 + - type: pypi + namespace: + name: bluepyopt + version: + qualifiers: {} + subpath: + primary_language: Python + description: Bluebrain Python Optimisation Library (bluepyopt) + release_date: + parties: + - type: person + role: author + name: BlueBrain Project, EPFL + email: werner.vangeit@epfl.ch + url: + keywords: + - optimisation + - neuroscience + - BlueBrainProject + - 'Development Status :: 5 - Production/Stable' + - 'Environment :: Console' + - 'Programming Language :: Python :: 3 :: Only' + - 'Operating System :: POSIX' + - 'Topic :: Scientific/Engineering' + - 'Topic :: Utilities' + homepage_url: https://github.com/BlueBrain/BluePyOpt + download_url: + size: + sha1: + md5: + sha256: + sha512: + bug_tracking_url: + code_view_url: + vcs_url: + copyright: + holder: + declared_license_expression: lgpl-3.0 + declared_license_expression_spdx: LGPL-3.0-only + license_detections: + - license_expression: lgpl-3.0 + license_expression_spdx: LGPL-3.0-only + matches: + - license_expression: lgpl-3.0 + spdx_license_expression: LGPL-3.0-only + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 1 + end_line: 1 + matcher: 1-hash + score: '100.0' + matched_length: 1 + match_coverage: '100.0' + rule_relevance: 100 + rule_identifier: lgpl-3.0_29.RULE + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE + matched_text: LGPLv3 + identifier: lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5 + - license_expression: lgpl-3.0 + license_expression_spdx: LGPL-3.0-only + matches: + - license_expression: lgpl-3.0 + spdx_license_expression: LGPL-3.0-only + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 1 + end_line: 1 + matcher: 1-hash + score: '100.0' + matched_length: 10 + match_coverage: '100.0' + rule_relevance: 100 + rule_identifier: pypi_gnu_lesser_general_public_license_v3.RULE + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE + matched_text: '- ''License :: OSI Approved :: GNU Lesser General Public License + v3 (LGPLv3)''' + identifier: lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321 + other_license_expression: + other_license_expression_spdx: + other_license_detections: [] + extracted_license_statement: | + license: LGPLv3 + classifiers: + - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)' + notice_text: + source_packages: [] + is_private: no + is_virtual: no + extra_data: {} + repository_homepage_url: https://pypi.org/project/bluepyopt + repository_download_url: + api_data_url: https://pypi.org/pypi/bluepyopt/json + package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_paths: + - manifests/pypi/bluepyopt_setup.py + datasource_ids: + - pypi_setup_py + purl: pkg:pypi/bluepyopt dependencies: - purl: pkg:npm/bluebird extracted_requirement: ^2.9.30 @@ -494,6 +588,149 @@ dependencies: for_package_uid: pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758 datafile_path: manifests/npm-license-string/package.json datasource_id: npm_package_json + - purl: pkg:pypi/numpy + extracted_requirement: '>=1.6' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pandas + extracted_requirement: '>=0.18' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/deap + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/efel + extracted_requirement: '>=2.13' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/ipyparallel + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pickleshare + extracted_requirement: '>=0.7.3' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/jinja2 + extracted_requirement: '>=2.8' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/future + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pebble + extracted_requirement: '>=4.3.10' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/scoop + extracted_requirement: '>=0.7' + scope: all + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/scoop + extracted_requirement: '>=0.7' + scope: scoop + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py license_detections: - identifier: apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8 license_expression: apache-2.0 @@ -1518,6 +1755,31 @@ license_rule_references: You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + - license_expression: lgpl-3.0 + identifier: lgpl-3.0_29.RULE + language: en + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE + is_license_text: no + is_license_notice: no + is_license_reference: yes + is_license_tag: no + is_license_intro: no + is_license_clue: no + is_continuous: no + is_builtin: yes + is_from_license: no + is_synthetic: no + length: 1 + relevance: 100 + minimum_coverage: 100 + referenced_filenames: [] + notes: + ignorable_copyrights: [] + ignorable_holders: [] + ignorable_authors: [] + ignorable_urls: [] + ignorable_emails: [] + text: LGPLv3 - license_expression: unknown-license-reference identifier: license-intro_72.RULE language: en @@ -2666,7 +2928,8 @@ files: api_data_url: https://pypi.org/pypi/bluepyopt/json datasource_id: pypi_setup_py purl: pkg:pypi/bluepyopt - for_packages: [] + for_packages: + - pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: no is_manifest: no is_readme: no diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json index 03bc4b3ab26..a83bb482bb7 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json @@ -550,17 +550,6 @@ "is_virtual": false, "extra_data": {}, "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.6", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=4.6", diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json index 1881cade819..316cede7806 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json @@ -314,17 +314,6 @@ "is_virtual": false, "extra_data": {}, "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.6", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=4.6", diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json index 6b7c95f57c9..527a1d6ef17 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json @@ -81,21 +81,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -220,19 +205,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/packagedcode/data/instance/python-package-instance-expected.json b/tests/packagedcode/data/instance/python-package-instance-expected.json index 6b7c95f57c9..527a1d6ef17 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected.json @@ -81,21 +81,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -220,19 +205,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json index 573c9c12da8..c7451cff7a4 100644 --- a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json @@ -98,21 +98,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -413,19 +398,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, 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 6489f14f0f8..294d876a3fe 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 @@ -400,6 +400,266 @@ "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "setup.py", "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jieba", + "extracted_requirement": "jieba", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/jieba?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/colorlog", + "extracted_requirement": "colorlog", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/colorlog?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/colorama", + "extracted_requirement": "colorama", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/colorama?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/seqeval", + "extracted_requirement": "seqeval", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/seqeval?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/multiprocess", + "extracted_requirement": "multiprocess", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/multiprocess?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/datasets", + "extracted_requirement": "datasets>=2.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/datasets?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/tqdm", + "extracted_requirement": "tqdm", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/tqdm?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/paddlefsl", + "extracted_requirement": "paddlefsl", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/paddlefsl?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/sentencepiece", + "extracted_requirement": "sentencepiece", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/sentencepiece?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/paddle2onnx", + "extracted_requirement": "paddle2onnx", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/paddle2onnx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" } ], "license_detections": [ @@ -460,6 +720,65 @@ } ] }, + { + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098", + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "detection_count": 2, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 9, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_83.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" + } + ] + }, { "identifier": "apache_2_0-999670be-3d5e-ebf8-ae18-b555c26c5e80", "license_expression": "apache-2.0", @@ -486,45 +805,27 @@ ] }, { - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a", + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e", "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "detection_count": 2, - "detection_log": [ - "unknown-reference-to-local-file" - ], + "detection_log": [], "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_83.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", - "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." - }, { "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ] }, @@ -553,31 +854,6 @@ } ] }, - { - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e", - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "detection_count": 2, - "detection_log": [], - "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "paddlenlp/LICENSE", - "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." - } - ] - }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", @@ -688,24 +964,24 @@ "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [], - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e" + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e" } ], "license_clues": [], - "percentage_of_license_text": 99.25, + "percentage_of_license_text": 60.0, "scan_errors": [] }, { @@ -765,8 +1041,24 @@ "license_expression": "apache-2.0", "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "spdx_license_expression": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, "matcher": "2-aho", "score": 100.0, "matched_length": 9, @@ -774,7 +1066,7 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_83.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." }, { @@ -782,26 +1074,26 @@ "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a" + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098" } ], "license_clues": [], - "percentage_of_license_text": 0.73, + "percentage_of_license_text": 25.64, "scan_errors": [] }, { @@ -1287,20 +1579,20 @@ "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [], - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e" + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e" }, { "license_expression": "apache-2.0", @@ -1334,8 +1626,24 @@ "license_expression": "apache-2.0", "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "spdx_license_expression": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, "matcher": "2-aho", "score": 100.0, "matched_length": 9, @@ -1343,7 +1651,7 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_83.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." }, { @@ -1351,22 +1659,22 @@ "spdx_license_expression": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a" + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE index 744bf2ba7ca..98c3ff99cf7 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE @@ -3,201 +3,3 @@ Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md index 0e65107b9d3..ec90f3b09c6 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md @@ -1,221 +1,8 @@ - -English | [简体中文](./README.md) - -

- -

- ------------------------------------------------------------------------------------------- -[![PyPI - PaddleNLP Version](https://img.shields.io/pypi/v/paddlenlp.svg?label=pip&logo=PyPI&logoColor=white)](https://pypi.org/project/paddlenlp/) -[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/paddlenlp)](https://pypi.org/project/paddlenlp/) -[![PyPI Status](https://pepy.tech/badge/paddlenlp/month)](https://pepy.tech/project/paddlenlp) -![support os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg) -![GitHub](https://img.shields.io/github/license/paddlepaddle/paddlenlp) - -## News - -* [2021-12-12] PaddleNLP v2.2 has been officially relealsed! :tada: For more information please refer to [Release Note](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.2.0). -* [2021-12-12] *End-to-end Question Answering Toolkit**🚀[RocketQA](https://github.com/PaddlePaddle/RocketQA) has been released!:tada: - ## Introduction **PaddleNLP** is an **easy-to-use** and **high performance** NLP library with **awesome** pre-trained Transformer models, supporting wide-range of NLP tasks from research to industrial applications. - -* **Easy-to-Use API** - - The API is fully integrated with PaddlePaddle 2.0 high-level API system. It minimizes the number of user actions required for common use cases like data loading, text pre-processing, awesome transfomer models, and fast inference, which enables developer to deal with text problems more productively. - -* **Wide-range NLP Task Support** - - PaddleNLP support NLP task from research to industrial applications, including Lexical Analysis, Text Classification, Text Matching, Text Generation, Information Extraction, Machine Translation, General Dialogue and Question Answering etc. - -* **High Performance Distributed Training** - - We provide an industrial level training pipeline for super large-scale Transformer model based on **Auto Mixed Precision** and Fleet distributed training API by PaddlePaddle, which can support customized model pre-training efficiently. - -## Community - -### Special Interest Group (SIG) - -Welcome to join [PaddleNLP SIG](https://iwenjuan.baidu.com/?code=bkypg8) for contribution, eg. Dataset, Models and Toolkit. - -### Slack - -To connect with other users and contributors, welcome to join our [Slack channel](https://paddlenlp.slack.com/). - -### WeChat - -Scan the QR code below with your Wechat⬇️. You can access to official technical exchange group. Look forward to your participation. - -
- -
- - -## Installation - -### Prerequisites - -* python >= 3.6 -* paddlepaddle >= 2.2 - -More information about PaddlePaddle installation please refer to [PaddlePaddle's Website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/conda/linux-conda.html). - -### Python pip Installation - -``` -pip install --upgrade paddlenlp -``` - -## Easy-to-use API - -### Taskflow:Off-the-shelf Industial NLP Pre-built Task - -Taskflow aims to provide **off-the-shelf** NLP pre-built task covering NLU and NLG scenario, in the meanwhile with extreamly fast infernece satisfying industrial applications. - -![taskflow1](https://user-images.githubusercontent.com/11793384/159693816-fda35221-9751-43bb-b05c-7fc77571dd76.gif) - -For more usage please refer to [Taskflow Docs](./docs/model_zoo/taskflow.md) - -### Transformer API: Awesome Pre-trained Model Ecosystem - -We provide **45+** network architectures and over **500+** pretrained models. Not only includes all the SOTA model like ERNIE, PLATO and SKEP released by Baidu, but also integrates most of the high quality Chinese pretrained model developed by other organizations. Use AutoModel to download pretrained mdoels of different architecture. We welcome all developers to contribute your Transformer models to PaddleNLP! 🤗 - -```python -from paddlenlp.transformers import * - -ernie = AutoModel.from_pretrained('ernie-1.0') -ernie_gram = AutoModel.from_pretrained('ernie-gram-zh') -bert = AutoModel.from_pretrained('bert-wwm-chinese') -albert = AutoModel.from_pretrained('albert-chinese-tiny') -roberta = AutoModel.from_pretrained('roberta-wwm-ext') -electra = AutoModel.from_pretrained('chinese-electra-small') -gpt = AutoModelForPretraining.from_pretrained('gpt-cpm-large-cn') -``` - -PaddleNLP also provides unified API experience for NLP task like semantic representation, text classification, sentence matching, sequence labeling, question answering, etc. - -```python -import paddle -from paddlenlp.transformers import * - -tokenizer = AutoTokenizer.from_pretrained('ernie-1.0') -text = tokenizer('natural language understanding') - -# Semantic Representation -model = AutoModel.from_pretrained('ernie-1.0') -sequence_output, pooled_output = model(input_ids=paddle.to_tensor([text['input_ids']])) -# Text Classificaiton and Matching -model = AutoModelForSequenceClassification.from_pretrained('ernie-1.0') -# Sequence Labeling -model = AutoModelForTokenClassification.from_pretrained('ernie-1.0') -# Question Answering -model = AutoModelForQuestionAnswering.from_pretrained('ernie-1.0') -``` - -For more pretrained model usage, please refer to [Transformer API](./docs/model_zoo/transformers.rst) - -### Dataset API: Abundant Dataset Integration and Quick Loading - -```python -from paddlenlp.datasets import load_dataset - -train_ds, dev_ds, test_ds = load_dataset("chnsenticorp", splits=["train", "dev", "test"]) -``` - -For more dataset API usage please refer to [Dataset API](./docs/datasets.md). - -### Embedding API: Quick Loading for Word Embedding - -```python -from paddlenlp.embeddings import TokenEmbedding - -wordemb = TokenEmbedding("fasttext.wiki-news.target.word-word.dim300.en") -wordemb.cosine_sim("king", "queen") ->>> 0.77053076 -wordemb.cosine_sim("apple", "rail") ->>> 0.29207364 -``` - -For more `TokenEmbedding` usage, please refer to [Embedding API](./docs/model_zoo/embeddings.md) - -### More API Usage - -- [Transformer API](./docs/model_zoo/transformers.rst) -- [Data API](./docs/data.md) -- [Dataset API](./docs/datasets.md) -- [Embedding API](./docs/model_zoo/embeddings.md) -- [Metrics API](./docs/metrics.md) - -Please find more API Reference from our [readthedocs](https://paddlenlp.readthedocs.io/). - -## Wide-range NLP Task Support - -PaddleNLP provides rich application examples covering mainstream NLP task to help developers accelerate problem solving. - -### NLP Basic Technique - -- [Word Embedding](./examples/word_embedding/) -- [Lexical Analysis](./examples/lexical_analysis/) -- [Dependency Parsing](./examples/dependency_parsing/) -- [Language Model](./examples/language_model/) -- [Semantic Parsing (Text to SQL)](./examples/text_to_sql):star: -- [Text Classification](./examples/text_classification/) -- [Text Matching](./examples/text_matching/) -- [Text Generation](./examples/text_generation/) -- [Text Correction](./examples/text_correction/):star: -- [Semantic Indexing](./examples/semantic_indexing/) -- [Information Extraction](./examples/information_extraction/) - -### NLP System - -- [Sentiment Analysis](./examples/sentiment_analysis/):star2: -- [General Dialogue System](./examples/dialogue/) -- [Machine Translation](./examples/machine_translation/) -- [Simultaneous Translation](././examples/simultaneous_translation/) -- [Machine Reading Comprehension](./examples/machine_reading_comprehension/) - -### NLP Extented Applications - -- [Few-shot Learning](./examples/few_shot/):star2: -- [Text Knowledge Mining](./examples/text_to_knowledge/):star2: -- [Model Compression](./examples/model_compression/) -- [Text Graph Learning](./examples/text_graph/erniesage/) -- [Time Series Prediction](./examples/time_series/) - -## Tutorials - -Please refer to our official AI Studio account for more interactive tutorials: [PaddleNLP on AI Studio](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/574995) - -* [What's Seq2Vec?](https://aistudio.baidu.com/aistudio/projectdetail/1283423) shows how to use simple API to finish LSTM model and solve sentiment analysis task. - -* [Sentiment Analysis with ERNIE](https://aistudio.baidu.com/aistudio/projectdetail/1294333) shows how to exploit the pretrained ERNIE to solve sentiment analysis problem. - -* [Waybill Information Extraction with BiGRU-CRF Model](https://aistudio.baidu.com/aistudio/projectdetail/1317771) shows how to make use of Bi-GRU plus CRF to finish information extraction task. - -* [Waybill Information Extraction with ERNIE](https://aistudio.baidu.com/aistudio/projectdetail/1329361) shows how to use ERNIE, the Chinese pre-trained model improve information extraction performance. - -* [Use TCN Model to predict COVID-19 confirmed cases](https://aistudio.baidu.com/aistudio/projectdetail/1290873) - -## ChangeLog - -For more details about our release, please refer to [ChangeLog](./docs/changelog.md) - -## Citation - -If you find PaddleNLP useful in your research, please consider cite -``` -@misc{=paddlenlp, - title={PaddleNLP: An Easy-to-use and High Performance NLP Library}, - author={PaddleNLP Contributors}, - howpublished = {\url{https://github.com/PaddlePaddle/PaddleNLP}}, - year={2021} -} -``` - -## Acknowledge - -We have borrowed from Hugging Face's [Transformer](https://github.com/huggingface/transformers)🤗 excellent design on pretrained models usage, and we would like to express our gratitude to the authors of Hugging Face and its open source community. - ## License PaddleNLP is provided under the [Apache-2.0 License](./LICENSE). diff --git a/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json b/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json index 1e875274ff8..9e61c90ff70 100644 --- a/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json +++ b/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json @@ -79,17 +79,6 @@ "resolved_package": {}, "extra_data": {} }, - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=3.0.0", diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json index dcf38dcda11..66098a665ff 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json @@ -125,127 +125,215 @@ "dependencies": [ { "purl": "pkg:pypi/pytz", - "extracted_requirement": ">=2021.3", + "extracted_requirement": "pytz>=2021.3", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pytz?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/billiard", - "extracted_requirement": "<4.0,>=3.6.4.0", + "extracted_requirement": "billiard>=3.6.4.0,<4.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/billiard?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kombu", - "extracted_requirement": "<6.0,>=5.2.3", + "extracted_requirement": "kombu>=5.2.3,<6.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kombu?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/vine", - "extracted_requirement": "<6.0,>=5.0.0", + "extracted_requirement": "vine>=5.0.0,<6.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/vine?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click", - "extracted_requirement": "<9.0,>=8.0.3", + "extracted_requirement": "click>=8.0.3,<9.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-didyoumean", - "extracted_requirement": ">=0.0.3", + "extracted_requirement": "click-didyoumean>=0.0.3", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-didyoumean?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-repl", - "extracted_requirement": ">=0.2.0", + "extracted_requirement": "click-repl>=0.2.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-repl?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-plugins", - "extracted_requirement": ">=1.1.1", + "extracted_requirement": "click-plugins>=1.1.1", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-plugins?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/importlib-metadata", - "extracted_requirement": ">=1.4.0", + "extracted_requirement": "importlib-metadata>=1.4.0", "scope": "install", "is_runtime": true, "is_optional": false, @@ -253,507 +341,879 @@ "is_direct": true, "resolved_package": {}, "extra_data": { - "python_version": "< 3.8" + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null }, "dependency_uid": "pkg:pypi/importlib-metadata?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyarango", - "extracted_requirement": ">=1.3.2", - "scope": "arangodb", + "extracted_requirement": "pyArango>=1.3.2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyarango?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/cryptography", - "extracted_requirement": null, - "scope": "auth", + "extracted_requirement": "cryptography", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/cryptography?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/azure-storage-blob@12.9.0", - "extracted_requirement": "==12.9.0", - "scope": "azureblockblob", + "extracted_requirement": "azure-storage-blob==12.9.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": true, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/azure-storage-blob@12.9.0?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/brotli", - "extracted_requirement": ">=1.0.0", - "scope": "brotli", + "extracted_requirement": "brotli>=1.0.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/brotli?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/brotlipy", - "extracted_requirement": ">=0.7.0", - "scope": "brotli", + "extracted_requirement": "brotlipy>=0.7.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/brotlipy?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/cassandra-driver", - "extracted_requirement": "<3.21.0", - "scope": "cassandra", + "extracted_requirement": "cassandra-driver<3.21.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/cassandra-driver?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/python-consul2", - "extracted_requirement": null, - "scope": "consul", + "extracted_requirement": "python-consul2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/python-consul2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pydocumentdb@2.3.2", - "extracted_requirement": "==2.3.2", - "scope": "cosmosdbsql", + "extracted_requirement": "pydocumentdb==2.3.2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": true, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pydocumentdb@2.3.2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/couchbase", - "extracted_requirement": ">=3.0.0", - "scope": "couchbase", + "extracted_requirement": "couchbase>=3.0.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/couchbase?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pycouchdb", - "extracted_requirement": null, - "scope": "couchdb", + "extracted_requirement": "pycouchdb", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pycouchdb?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/django", - "extracted_requirement": ">=1.11", - "scope": "django", + "extracted_requirement": "Django>=1.11", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/django?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/boto3", - "extracted_requirement": ">=1.9.178", - "scope": "dynamodb", + "extracted_requirement": "boto3>=1.9.178", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/boto3?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/elasticsearch", - "extracted_requirement": null, - "scope": "elasticsearch", + "extracted_requirement": "elasticsearch", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/elasticsearch?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/eventlet", - "extracted_requirement": ">=0.32.0", - "scope": "eventlet", + "extracted_requirement": "eventlet>=0.32.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/eventlet?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/gevent", - "extracted_requirement": ">=1.5.0", - "scope": "gevent", + "extracted_requirement": "gevent>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/gevent?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/librabbitmq", - "extracted_requirement": ">=1.5.0", - "scope": "librabbitmq", + "extracted_requirement": "librabbitmq>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/librabbitmq?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pylibmc", - "extracted_requirement": null, - "scope": "memcache", + "extracted_requirement": "pylibmc", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pylibmc?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pymongo", - "extracted_requirement": ">=3.11.1", - "scope": "mongodb", + "extracted_requirement": "pymongo[srv]>=3.11.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pymongo?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/msgpack", - "extracted_requirement": null, - "scope": "msgpack", + "extracted_requirement": "msgpack", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/msgpack?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/python-memcached", - "extracted_requirement": null, - "scope": "pymemcache", + "extracted_requirement": "python-memcached", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/python-memcached?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyro4", - "extracted_requirement": null, - "scope": "pyro", + "extracted_requirement": "pyro4", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyro4?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pytest-celery", - "extracted_requirement": null, - "scope": "pytest", + "extracted_requirement": "pytest-celery", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pytest-celery?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/redis", - "extracted_requirement": "!=4.0.0,!=4.0.1,>=3.4.1", - "scope": "redis", + "extracted_requirement": "redis>=3.4.1,!=4.0.0,!=4.0.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/redis?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/boto3", - "extracted_requirement": ">=1.9.125", - "scope": "s3", + "extracted_requirement": "boto3>=1.9.125", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/boto3?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/softlayer-messaging", - "extracted_requirement": ">=1.0.3", - "scope": "slmq", + "extracted_requirement": "softlayer_messaging>=1.0.3", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/softlayer-messaging?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/ephem", - "extracted_requirement": null, - "scope": "solar", + "extracted_requirement": "ephem", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/ephem?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/sqlalchemy", - "extracted_requirement": null, - "scope": "sqlalchemy", + "extracted_requirement": "sqlalchemy", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/sqlalchemy?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kombu", - "extracted_requirement": null, - "scope": "sqs", + "extracted_requirement": "kombu[sqs]", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kombu?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/tblib", - "extracted_requirement": ">=1.3.0", - "scope": "tblib", + "extracted_requirement": "tblib>=1.3.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/tblib?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/tblib", - "extracted_requirement": ">=1.5.0", - "scope": "tblib", + "extracted_requirement": "tblib>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/tblib?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyyaml", - "extracted_requirement": ">=3.10", - "scope": "yaml", + "extracted_requirement": "PyYAML>=3.10", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyyaml?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kazoo", - "extracted_requirement": ">=1.3.1", - "scope": "zookeeper", + "extracted_requirement": "kazoo>=1.3.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kazoo?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/zstandard", - "extracted_requirement": null, - "scope": "zstd", + "extracted_requirement": "zstandard", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/zstandard?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" } ], "files": [ diff --git a/tests/packagedcode/test_pypi.py b/tests/packagedcode/test_pypi.py index 7164214dd95..37bd2043275 100644 --- a/tests/packagedcode/test_pypi.py +++ b/tests/packagedcode/test_pypi.py @@ -296,7 +296,7 @@ def test_parse_metadata_prefer_pkg_info_from_egg_info_from_command_line(self): # `celery/celery.egg-info/PKG-INFO` vc = VirtualCodebase(location=result_file) for dep in vc.attributes.dependencies: - assert dep['datafile_path'] == 'celery/celery.egg-info/PKG-INFO' + assert dep['datafile_path'] == 'celery/celery.egg-info/requires.txt' for pkg in vc.attributes.packages: for path in pkg['datafile_paths']: assert path == 'celery/celery.egg-info/PKG-INFO' diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json new file mode 100644 index 00000000000..66801f6ebe5 --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json @@ -0,0 +1,890 @@ +{ + "summary": { + "declared_license_expression": "mit", + "license_clarity_score": { + "score": 100, + "declared_license": true, + "identification_precision": true, + "has_license_text": true, + "declared_copyrights": true, + "conflicting_license_categories": false, + "ambiguous_compound_licensing": false + }, + "declared_holder": "Nick Galbreath", + "primary_language": "Python", + "other_license_expressions": [ + { + "value": "bsd-new", + "count": 3 + }, + { + "value": null, + "count": 1 + } + ], + "other_holders": [ + { + "value": null, + "count": 1 + } + ], + "other_languages": [] + }, + "packages": [ + { + "type": "pypi", + "namespace": null, + "name": "BunkerWeb", + "version": "1.5.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Make your web services secure by default !", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Bunkerity", + "email": "contact@bunkerity.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/BunkerWeb", + "repository_download_url": "https://pypi.org/packages/source/B/BunkerWeb/BunkerWeb-1.5.8.tar.gz", + "api_data_url": "https://pypi.org/pypi/BunkerWeb/1.5.8/json", + "package_uid": "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "bunkerweb/pyproject.toml" + ], + "datasource_ids": [ + "pypi_pyproject_toml" + ], + "purl": "pkg:pypi/bunkerweb@1.5.8" + } + ], + "dependencies": [], + "license_detections": [ + { + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 41, + "end_line": 41, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE" + } + ] + }, + { + "identifier": "bsd_new-90c8b089-2f85-4a93-d0c8-a411247c6395", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_26.RULE" + }, + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_98.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_98.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ] + }, + { + "identifier": "bsd_new-99f77058-447d-ca1d-7b17-8e92d1a664e4", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ] + }, + { + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ] + } + ], + "files": [ + { + "path": "bunkerweb", + "type": "directory", + "name": "bunkerweb", + "base_name": "bunkerweb", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 4, + "dirs_count": 2, + "size_count": 4405, + "scan_errors": [] + }, + { + "path": "bunkerweb/LICENSE.md", + "type": "file", + "name": "LICENSE.md", + "base_name": "LICENSE", + "extension": ".md", + "size": 1084, + "sha1": "242b333ee88b352d41d2aafe9994a9f77de370f1", + "md5": "caa29ac8cda378ef687072b0b1c8c0e4", + "sha256": "9a5ef97962dd0750ed94f1ee3aa029136aa2a06586026b179730a777f50c8702", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": true, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "license_clues": [], + "percentage_of_license_text": 94.71, + "copyrights": [ + { + "copyright": "Copyright (c) 2012-2016, Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps", + "type": "directory", + "name": "deps", + "base_name": "deps", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 2, + "dirs_count": 1, + "size_count": 2998, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection", + "type": "directory", + "name": "libinjection", + "base_name": "libinjection", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 2, + "dirs_count": 0, + "size_count": 2998, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection/COPYING.txt", + "type": "file", + "name": "COPYING.txt", + "base_name": "COPYING", + "extension": ".txt", + "size": 1574, + "sha1": "16eb1fced5e1f443e68b3ff36f3328ac8f31d893", + "md5": "2493d74f84f74417cd51943cb1141a42", + "sha256": "88ef2e3f1383c20ad745a60edbce61fe510eda64e6b09a0e833c3660c9386810", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": true, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": "bsd-new", + "detected_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ], + "identifier": "bsd_new-99f77058-447d-ca1d-7b17-8e92d1a664e4" + } + ], + "license_clues": [], + "percentage_of_license_text": 94.09, + "copyrights": [ + { + "copyright": "Copyright (c) 2012-2016, Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection/setup.py", + "type": "file", + "name": "setup.py", + "base_name": "setup", + "extension": ".py", + "size": 1424, + "sha1": "a56c141912506e2eb94bfa164687131ff21fb298", + "md5": "ea7cba7d908eaa03a5b49b245b8119ef", + "sha256": "d61b7ebe3ebdb52e4e1ffe8ae28313ea7560ab619f9f0b211f6cd988d849f907", + "mime_type": "text/plain", + "file_type": "Python script, ASCII text executable", + "programming_language": "Python", + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": true, + "is_script": true, + "package_data": [ + { + "type": "pypi", + "namespace": null, + "name": "libinjection", + "version": "3.9.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Wrapper around libinjection c-code to detect sqli", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Nick Galbreath", + "email": "nickg@client9.com", + "url": null + } + ], + "keywords": [ + "Intended Audience :: Developers", + "Topic :: Database", + "Topic :: Security", + "Operating System :: OS Independent", + "Development Status :: 3 - Alpha", + "Topic :: Internet :: Log Analysis", + "Topic :: Internet :: WWW/HTTP" + ], + "homepage_url": "https://libinjection.client9.com/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "bsd-new", + "declared_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "- 'License :: OSI Approved :: BSD License'" + } + ], + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "classifiers:\n - 'License :: OSI Approved :: BSD License'\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://pypi.org/project/libinjection", + "repository_download_url": "https://pypi.org/packages/source/l/libinjection/libinjection-3.9.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/libinjection/3.9.1/json", + "datasource_id": "pypi_setup_py", + "purl": "pkg:pypi/libinjection@3.9.1" + } + ], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": "bsd-new", + "detected_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_26.RULE" + }, + { + "license_expression": "unknown-license-reference", + "spdx_license_expression": "LicenseRef-scancode-unknown-license-reference", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_98.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_98.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ], + "identifier": "bsd_new-90c8b089-2f85-4a93-d0c8-a411247c6395", + "detection_log": [ + "unknown-reference-to-local-file" + ] + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 41, + "end_line": 41, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE" + } + ], + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5" + } + ], + "license_clues": [], + "percentage_of_license_text": 7.58, + "copyrights": [ + { + "copyright": "Copyright 2012, 2013, 2014 Nick Galbreath nickg@client9.com", + "start_line": 4, + "end_line": 5 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 4, + "end_line": 4 + } + ], + "authors": [ + { + "author": "Nick Galbreath", + "start_line": 31, + "end_line": 31 + } + ], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/pyproject.toml", + "type": "file", + "name": "pyproject.toml", + "base_name": "pyproject", + "extension": ".toml", + "size": 323, + "sha1": "e97ff042e27bc5be29abf6483ea57c3abfbfba83", + "md5": "bef2744dd896358a9e799e90cb890883", + "sha256": "2e71a200631f19ee4ebaf8a3c0efe859aa3eeef35adba95268282147ad7b8253", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [ + { + "type": "pypi", + "namespace": null, + "name": "BunkerWeb", + "version": "1.5.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Make your web services secure by default !", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Bunkerity", + "email": "contact@bunkerity.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://pypi.org/project/BunkerWeb", + "repository_download_url": "https://pypi.org/packages/source/B/BunkerWeb/BunkerWeb-1.5.8.tar.gz", + "api_data_url": "https://pypi.org/pypi/BunkerWeb/1.5.8/json", + "datasource_id": "pypi_pyproject_toml", + "purl": "pkg:pypi/bunkerweb@1.5.8" + } + ], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md b/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md new file mode 100644 index 00000000000..8d45d9625d3 --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md @@ -0,0 +1,21 @@ +Copyright (c) 2012-2016, Nick Galbreath +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt new file mode 100644 index 00000000000..35edb2a6aed --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt @@ -0,0 +1,32 @@ +Copyright (c) 2012-2016, Nick Galbreath +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +https://github.com/client9/libinjection +http://opensource.org/licenses/BSD-3-Clause \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py new file mode 100644 index 00000000000..10a8f54333e --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py @@ -0,0 +1,49 @@ +""" +libinjection module for python + + Copyright 2012, 2013, 2014 Nick Galbreath + nickg@client9.com + BSD License -- see COPYING.txt for details +""" +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + +MODULE = Extension( + '_libinjection', [ + 'libinjection/libinjection_wrap.c', + 'libinjection/libinjection_sqli.c', + 'libinjection/libinjection_html5.c', + 'libinjection/libinjection_xss.c' + ], + swig_opts=['-Wextra', '-builtin'], + define_macros = [], + include_dirs = [], + libraries = [], + library_dirs = [], + ) + +setup ( + name = 'libinjection', + version = '3.9.1', + description = 'Wrapper around libinjection c-code to detect sqli', + author = 'Nick Galbreath', + author_email = 'nickg@client9.com', + url = 'https://libinjection.client9.com/', + ext_modules = [MODULE], + packages = ['libinjection'], + long_description = ''' +wrapper around libinjection +''', + classifiers = [ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Topic :: Database', + 'Topic :: Security', + 'Operating System :: OS Independent', + 'Development Status :: 3 - Alpha', + 'Topic :: Internet :: Log Analysis', + 'Topic :: Internet :: WWW/HTTP' + ] + ) \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml b/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml new file mode 100644 index 00000000000..6a2fa300d5a --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml @@ -0,0 +1,19 @@ +[project] +name = "BunkerWeb" +description = "Make your web services secure by default !" +version = "1.5.8" +authors = [ + { name = "Bunkerity", email = "contact@bunkerity.com" } +] + +[tool.black] +line-length = 160 +include = '\.pyi?$' +exclude = ''' +/( + | \.git + | src/deps/src + | src/common/core/modsecurity + | env +)/ +''' diff --git a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json index 2a9073e967a..41aa25c6f43 100644 --- a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json +++ b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json @@ -44,19 +44,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, @@ -107,19 +95,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/summarycode/test_summarizer.py b/tests/summarycode/test_summarizer.py index 4be0380906c..0e695c79845 100644 --- a/tests/summarycode/test_summarizer.py +++ b/tests/summarycode/test_summarizer.py @@ -124,6 +124,18 @@ def test_summary_multiple_package_data(self): ]) check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + def test_summary_root_package_with_embedded_packages(self): + test_dir = self.get_test_loc('summary/embedded_packages/bunkerweb') + result_file = self.get_temp_file('json') + expected_file = self.get_test_loc('summary/embedded_packages/bunkerweb.expected.json') + run_scan_click([ + '-clip', + '--summary', + '--classify', + '--json-pp', result_file, test_dir + ]) + check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + def test_summary_use_holder_from_package_resource(self): test_dir = self.get_test_loc('summary/use_holder_from_package_resource/codebase') result_file = self.get_temp_file('json')