From 620a557cf8d83fd1f484489bed2ddea1a3ae965e Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:14:59 +0000 Subject: [PATCH 01/11] repo: add python 3.12 + 3.13 support drop EOL python 3.8 Signed-off-by: Konrad Weihmann --- .github/workflows/push.yml | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 385fc6c..f571721 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -27,7 +27,7 @@ jobs: strategy: max-parallel: 5 matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 diff --git a/setup.py b/setup.py index 73610ea..4fd0fdd 100644 --- a/setup.py +++ b/setup.py @@ -50,10 +50,11 @@ "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3", "Topic :: Software Development :: Quality Assurance", ], From e94287007fc2364dad9e2448f6fadd2f6729e6bf Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:15:34 +0000 Subject: [PATCH 02/11] requirements-dev: drop flake8-logging-format as upstream is creating releases without tags in a non-transparent way, so that resource can't be trusted anymore Signed-off-by: Konrad Weihmann --- requirements-dev.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 4727b9d..e9d274e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -17,7 +17,6 @@ flake8-executable ~= 2.1 flake8-fixme ~= 1.1 flake8-functions == 0.0.8 flake8-isort == 6.1.1 -flake8-logging-format == 1.0.0 flake8-mutable ~= 1.2 flake8-pep3101 ~= 2.1 flake8-print ~= 5.0 From b2e9c3ead6fb28c0ea54b9ad8928393054245a47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 03:31:40 +0000 Subject: [PATCH 03/11] build(deps-dev): dlint requirement to ~=0.16 Updates the requirements on [dlint] (https://github.com/dlint-py/dlint) to permit the latest version. --- updated-dependencies: - dependency-name: dlint dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e9d274e..59c7299 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ bump2version ~= 1.0 dataclasses ~= 0.6 -dlint ~= 0.15 +dlint ~= 0.16 flake8 ~= 7.1 flake8-2020 ~= 1.8 flake8-bandit ~= 4.1 From 8852dae1f8be83b15a1ccd0474ac08634307eec7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 03:17:11 +0000 Subject: [PATCH 04/11] build(deps-dev): pytest-cov requirement to ~=6.0 Updates the requirements on [pytest-cov] (https://github.com/pytest-dev/pytest-cov) to permit the latest version. --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 59c7299..a6a6823 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -26,7 +26,7 @@ flake8-string-format ~= 0.3 flake8-variables-names == 0.0.6 pytest ~= 8.3 pytest-bandit ~= 0.6 -pytest-cov ~= 5.0 +pytest-cov ~= 6.0 pytest-forked ~= 1.6 pytest-icdiff ~= 0.9 pytest-random-order ~= 1.1 From 3e8b4b465cdf802772d77c9fdde7ef7caa92df2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 03:15:55 +0000 Subject: [PATCH 05/11] build(deps-dev): update flake8-comprehensions requirement Updates the requirements on [flake8-comprehensions] (https://github.com/adamchainz/flake8-comprehensions) --- updated-dependencies: - dependency-name: flake8-comprehensions dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a6a6823..07f6c31 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,7 +9,7 @@ flake8-bugbear ~= 24.8 flake8-builtins ~= 2.5 flake8-coding ~= 1.3 flake8-commas ~= 4.0 -flake8-comprehensions ~= 3.15 +flake8-comprehensions ~= 3.16 flake8-debugger ~= 4.1 flake8-docstrings ~= 1.7 flake8-eradicate ~= 1.5 From 6ac3f1b4b7f3125e3489a83daa0715776a817f7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 03:15:52 +0000 Subject: [PATCH 06/11] build(deps): update license-expression requirement ~=30.4 Updates the requirements on [license-expression] (https://github.com/aboutcode-org/license-expression) --- updated-dependencies: - dependency-name: license-expression dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1f9eb5f..3d51973 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -license-expression ~= 30.3 +license-expression ~= 30.4 osadl-matrix==2024.5.7.50556 foss-flame ~= 0.20 From 5365b6be6116a3f4a079a64549b272b2236e31e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 03:30:45 +0000 Subject: [PATCH 07/11] build(deps): bump osadl-matrix to 2024.5.22.10535 --- updated-dependencies: - dependency-name: osadl-matrix dependency-type: direct:production update-type: version-update:semver-patch ... Closes #372 Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3d51973..07be68f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ license-expression ~= 30.4 -osadl-matrix==2024.5.7.50556 +osadl-matrix==2024.5.22.10535 foss-flame ~= 0.20 From b8d7a55568b3a2271ab648c0c9084db0a56a701d Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:23:24 +0000 Subject: [PATCH 08/11] tests: update expectations mainly due to the updates of the used libs Signed-off-by: Konrad Weihmann --- tests/test_problems.py | 3 --- tests/test_simplified.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_problems.py b/tests/test_problems.py index 3aeae81..7af63b2 100644 --- a/tests/test_problems.py +++ b/tests/test_problems.py @@ -25,9 +25,6 @@ def _get_problems(inbound, outbound): def test_problems_no(): assert len(_get_problems('MIT', 'GPL-2.0-only')) == 0 -def test_problems_uknonwn(): - assert len(_get_problems('HPND', 'GPL-2.0-only')) == 1 - def test_problems_undefined(): assert len(_get_problems('NONESUCH', 'GPL-2.0-only')) == 1 diff --git a/tests/test_simplified.py b/tests/test_simplified.py index 726ecd4..8ee5966 100644 --- a/tests/test_simplified.py +++ b/tests/test_simplified.py @@ -22,7 +22,7 @@ def test_simplify(): _test_expression(['MIT and MIT or BSD3'], '{"original": "MIT and MIT or BSD3", "simplified": "BSD-3-Clause OR MIT"}') _test_expression(['GPL-2.0-only'], '{"original": "GPL-2.0-only", "simplified": "GPL-2.0-only"}') _test_expression(['GPL-2.0-or-later'], '{"original": "GPL-2.0-or-later", "simplified": "GPL-2.0-only OR GPL-3.0-only"}') - _test_expression(['GPL-2.0-or-later and MIT'], '{"original": "GPL-2.0-or-later and MIT", "simplified": "MIT AND (GPL-2.0-only OR GPL-3.0-only)"}') + _test_expression(['GPL-2.0-or-later and MIT'], '{"original": "GPL-2.0-or-later and MIT", "simplified": "(GPL-2.0-only AND MIT) OR (GPL-3.0-only AND MIT)"}') _test_expression(['MIT and GPL-2.0-only WITH Classpath-exception-2.0 and MIT'], '{"original": "MIT and GPL-2.0-only WITH Classpath-exception-2.0 and MIT", "simplified": "GPL-2.0-only WITH Classpath-exception-2.0 AND MIT"}') From 664fe2fd373515545b9b128c236a9eb232225e01 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:30:52 +0000 Subject: [PATCH 09/11] ci: gitlint: increase subject allowed length Signed-off-by: Konrad Weihmann --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f571721..3403c1f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,7 +18,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} commit-message-body-max-length: 72 commit-message-body-min-length: 1 - commit-message-subject-max-length: 50 + commit-message-subject-max-length: 60 commit-message-subject-min-length: 10 re-commit-message-subject: ".+: .+" re-pull-request-title: ".*" From 4c6e6c6af9778e7d6a8bb163fbad0c5671af88bf Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:44:56 +0000 Subject: [PATCH 10/11] suggest_outbound_candidate: proper list handling if input is a list, handle it accordingly Closes #391 Signed-off-by: Konrad Weihmann --- flict/impl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flict/impl.py b/flict/impl.py index a074629..690272b 100644 --- a/flict/impl.py +++ b/flict/impl.py @@ -51,10 +51,12 @@ def suggest_outbound_candidate(self): allowed_licenses = [x for x in licenses if self.arbiter.license_allowed(x)] + lic_expr_list = [license_expression] if isinstance(license_expression, str) else license_expression + outbounds = [] try: for outbound in allowed_licenses: - compats = self.arbiter.inbounds_outbound_check(outbound, [license_expression]) + compats = self.arbiter.inbounds_outbound_check(outbound, lic_expr_list) compat = compats['compatibility'] == 'Yes' if compat: outbounds.append(outbound) From 0dfec44d9a295282c1d08ecaf9fad826879a8116 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Fri, 1 Nov 2024 07:59:37 +0000 Subject: [PATCH 11/11] pytest: use pytest-xdist to run tests in parallel Signed-off-by: Konrad Weihmann --- requirements-dev.txt | 1 + setup.cfg | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 07f6c31..426646c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -33,6 +33,7 @@ pytest-random-order ~= 1.1 pytest-socket ~= 0.7 pytest-sugar ~= 1.0 pytest-tldr ~= 0.2 +pytest-xdist ~= 3.6 twine ~= 5.1 jsonschema ~= 4.23 reuse ~= 4.0 diff --git a/setup.cfg b/setup.cfg index 916b028..d61c57a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,4 +43,5 @@ addopts = --no-header --quiet --random-order --random-order-bucket=global - --showlocals \ No newline at end of file + --showlocals + -n auto \ No newline at end of file