From 05be5428ba38163f47374434b8872a8b008e3904 Mon Sep 17 00:00:00 2001 From: Chin Yeung Li Date: Mon, 16 Sep 2024 17:01:09 +0800 Subject: [PATCH 1/4] Fixed #571 #572 - Fixed the entry point and install requirement Signed-off-by: Chin Yeung Li Signed-off-by: Dhruv276R --- CHANGELOG.rst | 8 ++++++-- Dockerfile | 2 +- about.ABOUT | 2 +- setup.cfg | 1 + src/attributecode/__init__.py | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b54987bf..67d87d94 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ ============================== Changelog +2024-09-16 + Release 11.0.2 + + * Fixed the installation issues with docker (#571, #572) + + 2024-08-06 Release 11.0.1 @@ -8,8 +14,6 @@ Changelog * Added fields type and types description into the spec * Update link references of ownership from nexB to aboutcode-org -Signed-off-by: Chin Yeung Li - 2024-07-15 Release 11.0.0 diff --git a/Dockerfile b/Dockerfile index 520d762e..0bb67e2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,4 +30,4 @@ RUN bash -c "source ./configure" # Set entrypoint to be the aboutcode command, allows to run the generated docker image directly with the aboutcode arguments: # `docker run (...) ` # Example: docker run --rm --name "aboutcode" -v ${PWD}:/project -v /tmp/result:/result aboutcode-toolkit attrib /project /result/c.html -ENTRYPOINT ["./bin/about"] +ENTRYPOINT ["./about"] diff --git a/about.ABOUT b/about.ABOUT index d22f262d..a4c08ef1 100644 --- a/about.ABOUT +++ b/about.ABOUT @@ -1,6 +1,6 @@ about_resource: . name: AboutCode-toolkit -version: 11.0.1 +version: 11.0.2 author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez copyright: Copyright (c) nexB Inc. description: | diff --git a/setup.cfg b/setup.cfg index 95b1e997..65bdb747 100644 --- a/setup.cfg +++ b/setup.cfg @@ -66,6 +66,7 @@ install_requires = license_expression >= 0.94 openpyxl packageurl_python >= 0.9.0 + requests saneyaml diff --git a/src/attributecode/__init__.py b/src/attributecode/__init__.py index 171e56a4..4c77da0d 100644 --- a/src/attributecode/__init__.py +++ b/src/attributecode/__init__.py @@ -20,7 +20,7 @@ import saneyaml -__version__ = '11.0.1' +__version__ = '11.0.2' __about_spec_version__ = '4.0.0' From 8943ed8fef00408c2c6991e95dc7da64cd22fb69 Mon Sep 17 00:00:00 2001 From: Dhruv276R Date: Tue, 14 Jan 2025 11:36:17 +0530 Subject: [PATCH 2/4] Rewritten assert statements for more explicit checks Signed-off-by: Dhruv276R --- src/attributecode/attrib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/attributecode/attrib.py b/src/attributecode/attrib.py index b22c6d93..b0062d96 100644 --- a/src/attributecode/attrib.py +++ b/src/attributecode/attrib.py @@ -193,8 +193,12 @@ def generate_sctk_input(abouts, min_license_score, license_dict): for key in lic_key: lic_name.append(license_dict[key][0]) lic_score = about.license_score.value - assert len(lic_key) == len(lic_name) - assert len(lic_key) == len(lic_score) + if len(lic_key) != len(lic_name): + raise ValueError("Mismatch in length: 'lic_key' and 'lic_name' must have the same number of elements") + + if len(lic_key) != len(lic_score): + raise ValueError("Mismatch in length: 'lic_key' and 'lic_score' must have the same number of elements") + lic_key_expression = about.license_key_expression.value if lic_key_expression: From f28f02eef877d707fa6889e573dbd7a47aaa5de0 Mon Sep 17 00:00:00 2001 From: Dhruv276R Date: Sat, 18 Jan 2025 12:24:08 +0530 Subject: [PATCH 3/4] Updated Python Signed-off-by: Dhruv276R --- .github/workflows/docs-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 511b7c28..cb22c15b 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9] + python-version: [3.10] steps: - name: Checkout code From 2f14f576e5c1ac965a52b22af87dc2f8c30f7574 Mon Sep 17 00:00:00 2001 From: Dhruv276R Date: Sat, 18 Jan 2025 12:38:49 +0530 Subject: [PATCH 4/4] Updated deps Signed-off-by: Dhruv276R --- requirements.txt | 80 ------------------------------------------------ 1 file changed, 80 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4722a44a..e69de29b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,80 +0,0 @@ -attrs==21.4.0 -banal==1.0.6 -beautifulsoup4==4.11.1 -binaryornot==0.4.4 -boolean.py==3.8 -certifi==2023.7.22 -cffi==1.15.0 -chardet==4.0.0 -charset-normalizer==2.0.12 -click==8.0.4 -colorama==0.4.4 -commoncode==30.2.0 -construct==2.10.68 -container-inspector==31.0.0 -cryptography==42.0.4 -debian-inspector==30.0.0 -dockerfile-parse==1.2.0 -dparse2==0.6.1 -extractcode==31.0.0 -extractcode-7z==16.5.210531 -extractcode-libarchive==3.5.1.210531 -fasteners==0.17.3 -fingerprints==1.0.3 -ftfy==6.0.3 -future==0.18.2 -gemfileparser==0.8.0 -html5lib==1.1 -idna==3.7 -importlib-metadata==4.8.3 -inflection==0.5.1 -intbitset==3.0.1 -isodate==0.6.1 -jaraco.functools==3.4.0 -javaproperties==0.8.1 -Jinja2==3.1.4 -jsonstreams==0.6.0 -license-expression==21.6.14 -lxml==4.9.1 -MarkupSafe==2.0.1 -more-itertools==8.13.0 -normality==2.3.3 -packagedcode-msitools==0.101.210706 -packageurl-python==0.9.9 -packaging==21.3 -parameter-expansion-patched==0.3.1 -patch==1.16 -pdfminer-six==20220506 -pefile==2021.9.3 -pip-requirements-parser==31.2.0 -pkginfo2==30.0.0 -pluggy==1.0.0 -plugincode==30.0.0 -ply==3.11 -publicsuffix2==2.20191221 -pyahocorasick==2.0.0b1 -pycparser==2.21 -pygmars==0.7.0 -Pygments==2.15.0 -pymaven-patch==0.3.0 -pyparsing==3.0.8 -pytz==2022.1 -PyYAML==6.0 -rdflib==5.0.0 -regipy==2.3.1 -requests==2.31.0 -rpm-inspector-rpm==4.16.1.3.210404 -saneyaml==0.5.2 -six==1.16.0 -soupsieve==2.3.1 -spdx-tools==0.7.0rc0 -text-unidecode==1.3 -toml==0.10.2 -typecode==30.0.0 -typecode-libmagic==5.39.210531 -urllib3==1.26.19 -urlpy==0.5 -wcwidth==0.2.5 -webencodings==0.5.1 -xmltodict==0.12.0 -zipp==3.6.0