diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 385fc6c..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: ".*" @@ -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/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) diff --git a/requirements-dev.txt b/requirements-dev.txt index 4727b9d..426646c 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 @@ -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 @@ -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 @@ -27,13 +26,14 @@ 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 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/requirements.txt b/requirements.txt index 1f9eb5f..07be68f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -license-expression ~= 30.3 -osadl-matrix==2024.5.7.50556 +license-expression ~= 30.4 +osadl-matrix==2024.5.22.10535 foss-flame ~= 0.20 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 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", ], 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"}')