Skip to content

Commit 3206969

Browse files
authored
Merge branch 'main' into 1687-codebaseresource-parent-and-top-paths
2 parents ed0403e + 0ecd1e8 commit 3206969

File tree

114 files changed

+30622
-24440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+30622
-24440
lines changed

.github/workflows/publish-docker.yml renamed to .github/workflows/publish-docker-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Docker image on GHCR
1+
name: Publish Docker image on GitHub Container Registry
22
# https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
33

44
on:
@@ -15,8 +15,8 @@ env:
1515
IMAGE_NAME: ${{ github.repository }}
1616

1717
jobs:
18-
build-and-push-image:
19-
runs-on: ubuntu-22.04
18+
build-and-publish-image:
19+
runs-on: ubuntu-24.04
2020

2121
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
2222
permissions:

.github/workflows/pypi-release-aboutcode-pipeline.yml renamed to .github/workflows/publish-pypi-release-aboutcode-pipeline.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ name: Build aboutcode.pipeline Python distributions and publish on PyPI
33
on:
44
workflow_dispatch:
55
push:
6-
tags:
7-
- "aboutcode.pipeline/*"
6+
tags:
7+
- "aboutcode.pipeline/*"
88

99
jobs:
1010
build-and-publish:
1111
name: Build and publish library to PyPI
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313

1414
steps:
1515
- uses: actions/checkout@v4
1616

1717
- name: Set up Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.12
20+
python-version: 3.13
2121

2222
- name: Install flot
2323
run: python -m pip install flot --user

.github/workflows/pypi-release.yml renamed to .github/workflows/publish-pypi-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ on:
99
jobs:
1010
build-and-publish:
1111
name: Build and publish library to PyPI
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313

1414
steps:
1515
- uses: actions/checkout@v4
1616

1717
- name: Set up Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.12
20+
python-version: 3.13
2121

2222
- name: Install pypa/build
2323
run: python -m pip install build --user

.github/workflows/ci-docker.yml renamed to .github/workflows/run-unit-tests-docker.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
name: Test on Docker CI
1+
name: Run unit tests on Docker container
22

3-
on: [push, pull_request]
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: read
412

513
jobs:
6-
build:
7-
runs-on: ubuntu-22.04
14+
run-unit-tests:
15+
runs-on: ubuntu-24.04
816

917
steps:
1018
- name: Checkout code
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Run unit tests on macOS
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
POSTGRES_DB: scancodeio
15+
POSTGRES_USER: scancodeio
16+
POSTGRES_PASSWORD: scancodeio
17+
18+
jobs:
19+
run-unit-tests:
20+
runs-on: macos-13
21+
22+
strategy:
23+
matrix:
24+
python-version: ["3.10", "3.11", "3.12", "3.13"]
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: ikalnytskyi/action-setup-postgres@v7
37+
id: postgres
38+
with:
39+
postgres-version: "14" # 13 is not supported.
40+
database: ${{ env.POSTGRES_DB }}
41+
username: ${{ env.POSTGRES_USER }}
42+
password: ${{ env.POSTGRES_PASSWORD }}
43+
port: 5432
44+
45+
- name: Install Python dependencies
46+
run: make dev envfile
47+
48+
- name: Run Django tests
49+
run: .venv/bin/python manage.py test --verbosity=2 --noinput
50+
env:
51+
SCANCODEIO_DB_NAME: ${{ env.POSTGRES_DB }}
52+
SCANCODEIO_DB_USER: ${{ env.POSTGRES_USER }}
53+
SCANCODEIO_DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }}

.github/workflows/ci.yml renamed to .github/workflows/run-unit-tests.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
name: Test CI
1+
name: Run unit tests
22

3-
on: [push, pull_request]
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: read
412

513
env:
614
POSTGRES_DB: scancodeio
@@ -9,8 +17,8 @@ env:
917
POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8
1018

1119
jobs:
12-
build:
13-
runs-on: ubuntu-22.04
20+
run-unit-tests:
21+
runs-on: ubuntu-24.04
1422

1523
services:
1624
postgres:
@@ -31,7 +39,7 @@ jobs:
3139
strategy:
3240
max-parallel: 4
3341
matrix:
34-
python-version: ["3.10", "3.11", "3.12"]
42+
python-version: ["3.10", "3.11", "3.12", "3.13"]
3543

3644
steps:
3745
- name: Checkout code

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ local
5151
*.rdb
5252
*.aof
5353
.vscode
54+
.ipynb_checkpoints
5455

5556
# This is only created when packaging for external redistribution
5657
/thirdparty/

CHANGELOG.rst

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,57 @@
11
Changelog
22
=========
33

4-
v34.12.0 (unreleased)
5-
---------------------
4+
v35.2.0 (unreleased)
5+
--------------------
6+
7+
- Refactor policies implementation to support more than licenses.
8+
The entire ``policies`` data is now stored on the ``ScanPipeConfig`` in place of the
9+
``license_policy_index``.
10+
Also, a new method ``get_policies_dict`` methods is now available on the ``Project``
11+
model to easily retrieve all the policies data as a dictionary.
12+
Renamed for clarity:
13+
* ``policy_index`` to ``license_policy_index``
14+
* ``policies_enabled`` to ``license_policies_enabled``
15+
https://github.com/aboutcode-org/scancode.io/pull/1718
16+
17+
- Add support for SPDX license identifiers as ``license_key`` in license policies
18+
``policies.yml`` file.
19+
https://github.com/aboutcode-org/scancode.io/issues/1348
20+
21+
v35.1.0 (2025-07-02)
22+
--------------------
23+
24+
- Replace the ``setup.py``/``setup.cfg`` by ``pyproject.toml`` file.
25+
https://github.com/aboutcode-org/scancode.io/issues/1608
26+
27+
- Update scancode-toolkit to v32.4.0. See CHANGELOG for updates:
28+
https://github.com/aboutcode-org/scancode-toolkit/releases/tag/v32.4.0
29+
Adds a new ``git_sha1`` attribute to the ``CodebaseResource`` model as this
30+
is now computed and returned from the ``scancode-toolkit`` ``--info`` plugin.
31+
https://github.com/aboutcode-org/scancode.io/pull/1708
32+
33+
- Add a ``--fail-on-vulnerabilities`` option in ``check-compliance`` management command.
34+
When this option is enabled, the command will exit with a non-zero status if known
35+
vulnerabilities are detected in discovered packages and dependencies.
36+
Requires the ``find_vulnerabilities`` pipeline to be executed beforehand.
37+
https://github.com/aboutcode-org/scancode.io/pull/1702
38+
39+
- Enable ``--license-references`` scan option in the ``scan_single_package`` pipeline.
40+
The ``license_references`` and ``license_rule_references`` attributes will now be
41+
available in the scan results, including the details about detected licenses and
42+
license rules used during the scan.
43+
https://github.com/aboutcode-org/scancode.io/issues/1657
44+
45+
- Add a new step to the ``DeployToDevelop`` pipeline, ``map_python``, to match
46+
Cython source files (.pyx) to their compiled binaries.
47+
https://github.com/aboutcode-org/scancode.io/pull/1703
48+
49+
v35.0.0 (2025-06-23)
50+
--------------------
51+
52+
- Add support for Python 3.13.
53+
Upgrade the base image in Dockerfile to ``python:3.13-slim``.
54+
https://github.com/aboutcode-org/scancode.io/pull/1469/files
655

756
- Display matched snippets details in "Resource viewer", including the package,
857
resource, and similarity values.
@@ -26,6 +75,17 @@ v34.12.0 (unreleased)
2675
Refine the CSS for the Resource viewer.
2776
https://github.com/aboutcode-org/scancode.io/pull/1692
2877

78+
- Add "(No value detected)" for Copyright and Holder charts.
79+
https://github.com/aboutcode-org/scancode.io/issues/1697
80+
81+
- Add "Package Compliance Alert" chart in the Policies section.
82+
https://github.com/aboutcode-org/scancode.io/pull/1699
83+
84+
- Update univers to v31.0.0, catch ``NotImplementedError`` in
85+
``get_unique_unresolved_purls``, and properly log error in project.
86+
https://github.com/aboutcode-org/scancode.io/pull/1700
87+
https://github.com/aboutcode-org/scancode.io/pull/1701
88+
2989
v34.11.0 (2025-05-02)
3090
---------------------
3191

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# ScanCode.io is a free software code scanning tool from nexB Inc. and others.
2121
# Visit https://github.com/aboutcode-org/scancode.io for support and download.
2222

23-
FROM python:3.12-slim
23+
FROM python:3.13-slim
2424

2525
LABEL org.opencontainers.image.source="https://github.com/aboutcode-org/scancode.io"
2626
LABEL org.opencontainers.image.description="ScanCode.io"
@@ -87,7 +87,7 @@ RUN mkdir -p /var/$APP_NAME/static/ \
8787
&& mkdir -p /var/$APP_NAME/workspace/
8888

8989
# Install the dependencies before the codebase COPY for proper Docker layer caching
90-
COPY --chown=$APP_USER:$APP_USER setup.cfg setup.py $APP_DIR/
90+
COPY --chown=$APP_USER:$APP_USER pyproject.toml $APP_DIR/
9191
RUN pip install --no-cache-dir .
9292

9393
# Copy the codebase and set the proper permissions for the APP_USER

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ docs:
143143
rm -rf docs/_build/
144144
@${ACTIVATE} sphinx-build docs/ docs/_build/
145145

146-
bump:
147-
@echo "-> Bump the version"
148-
@${ACTIVATE} bumpver update --no-fetch --patch
149-
150146
docker-images:
151147
@echo "-> Build Docker services"
152148
docker compose build
@@ -163,4 +159,4 @@ offline-package: docker-images
163159
@mkdir -p dist/
164160
@tar -cf dist/scancodeio-offline-package-`git describe --tags`.tar build/
165161

166-
.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate upgrade postgresdb sqlitedb backupdb run run-docker-dev test fasttest docs bump docker-images offline-package
162+
.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate upgrade postgresdb sqlitedb backupdb run run-docker-dev test fasttest docs docker-images offline-package

0 commit comments

Comments
 (0)