Skip to content

Commit 1659dd5

Browse files
Merge branch 'main' into license-detection-models
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents 519e6b0 + 9b8308a commit 1659dd5

File tree

68 files changed

+1259
-416
lines changed

Some content is hidden

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

68 files changed

+1259
-416
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ 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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ 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

.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: 12 additions & 4 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:

CHANGELOG.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Changelog
22
=========
33

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+
- Enhance the dependency tree view in a more dynamic rendering.
22+
Vulnerabilities and compliance alert are displayed along the dependency entries.
23+
https://github.com/aboutcode-org/scancode.io/pull/1742
24+
425
v35.1.0 (2025-07-02)
526
--------------------
627

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ docker-images:
151151
@echo "-> Save the service images to a tar archive in the build/ directory"
152152
@rm -rf build/
153153
@mkdir -p build/
154-
@docker save postgres redis scancodeio-worker scancodeio-web nginx | gzip > build/scancodeio-images.tar.gz
154+
@docker save postgres redis scancodeio-worker scancodeio-web nginx clamav/clamav | gzip > build/scancodeio-images.tar.gz
155155

156156
offline-package: docker-images
157157
@echo "-> Build package for offline installation in dist/"

docker-compose-offline.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1+
name: scancodeio
12
services:
23
db:
3-
image: postgres:13
4+
image: docker.io/library/postgres:13
45
env_file:
56
- docker.env
67
volumes:
78
- db_data:/var/lib/postgresql/data/
89

910
redis:
10-
image: redis
11+
image: docker.io/library/redis:latest
1112
# Enable redis data persistence using the "Append Only File" with the
1213
# default policy of fsync every second. See https://redis.io/topics/persistence
1314
command: redis-server --appendonly yes
1415
volumes:
1516
- redis_data:/data
1617

1718
web:
18-
image: scancodeio_web
19+
image: scancodeio-web
1920
command: sh -c "
2021
./manage.py migrate &&
2122
./manage.py collectstatic --no-input --verbosity 0 --clear &&
@@ -32,8 +33,12 @@ services:
3233
- db
3334

3435
worker:
35-
image: scancodeio_worker
36-
command: wait-for-it web:8000 -- ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker --queue-class scancodeio.worker.ScanCodeIOQueue --verbosity 2
36+
image: scancodeio-worker
37+
# Ensure that potential db migrations run first by waiting until "web" is up
38+
command: wait-for-it --strict --timeout=120 web:8000 -- sh -c "
39+
./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker
40+
--queue-class scancodeio.worker.ScanCodeIOQueue
41+
--verbosity 1"
3742
env_file:
3843
- docker.env
3944
volumes:
@@ -42,10 +47,10 @@ services:
4247
depends_on:
4348
- redis
4449
- db
45-
- web # Ensure that potential db migrations run first
50+
- web
4651

4752
nginx:
48-
image: nginx
53+
image: docker.io/library/nginx:latest
4954
ports:
5055
- 80:80
5156
- 443:443
@@ -55,8 +60,16 @@ services:
5560
depends_on:
5661
- web
5762

63+
clamav:
64+
image: clamav/clamav
65+
volumes:
66+
- clamav_data:/var/lib/clamav
67+
- workspace:/var/scancodeio/workspace/
68+
restart: always
69+
5870
volumes:
5971
db_data:
6072
redis_data:
73+
clamav_data:
6174
static:
6275
workspace:

docker-compose.dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# $ docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm web bash
77
# $ SCANCODEIO_TEST_FIXTURES_REGEN=1 ./manage.py test
88

9+
name: scancodeio
910
services:
1011
web:
1112
env_file:

0 commit comments

Comments
 (0)