Skip to content

Commit bfa3200

Browse files
committed
Merge branch 'main' into 1145-load-spdx-dependencies
2 parents 32cb9e0 + cbf1348 commit bfa3200

Some content is hidden

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

45 files changed

+649
-237
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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
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+
421
v35.1.0 (2025-07-02)
522
--------------------
623

docs/faq.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ you may use the Docker image to run pipelines as a single command:
2424
docker run --rm \
2525
-v "$(pwd)":/codedrop \
2626
ghcr.io/aboutcode-org/scancode.io:latest \
27-
sh -c "run scan_codebase /codedrop" \
27+
run scan_codebase /codedrop \
2828
> results.json
2929
3030
Refer to the :ref:`cli_run` section for more about this approach.
3131

32+
.. tip::
33+
Prefer a one-liner? Use this to scan your current directory::
34+
35+
curl -sSL https://raw.githubusercontent.com/aboutcode-org/scancode.io/main/etc/scripts/run-scan.sh | bash
36+
3237
.. _faq_which_pipeline:
3338

3439
Which pipeline should I use?

docs/index.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
ScanCode.io documentation
1+
ScanCode.io Documentation
22
=========================
33

4-
Welcome to the very start of your ScanCode.io journey! In this documentation
5-
you’ll find information on:
4+
Welcome! This is your starting point for everything ScanCode.io.
65

7-
- An overview of ScanCode.io and ScanPipe
8-
- Installation instructions
9-
- Tutorials to get you started
10-
- Reference documentation about the ScanPipe concepts, Pipelines, Pipes and more
11-
- How to make technical contributions to the project and the community
6+
In this documentation, you’ll find:
7+
8+
- A **QuickStart guide** to run your first scan
9+
- An **overview** of what ScanCode.io is and what it can do
10+
- **Installation instructions** for full access
11+
- Step-by-step **tutorials** to dive deeper
12+
- In-depth **reference docs** on concepts, pipelines, configuration, and APIs
13+
- Guides on how to **contribute** to the project and community
1214

1315
.. toctree::
1416
:maxdepth: 2
1517
:caption: Getting Started
1618

19+
quickstart
1720
introduction
1821
installation
1922
user-interface
@@ -23,7 +26,7 @@ you’ll find information on:
2326

2427
.. toctree::
2528
:maxdepth: 2
26-
:caption: Tutorial
29+
:caption: Tutorials
2730

2831
tutorial_web_ui_analyze_docker_image
2932
tutorial_web_ui_review_scan_results
@@ -37,7 +40,7 @@ you’ll find information on:
3740

3841
.. toctree::
3942
:maxdepth: 2
40-
:caption: Reference Documentation
43+
:caption: Reference
4144

4245
scanpipe-concepts
4346
built-in-pipelines

docs/installation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ And visit the web UI at: http://localhost/project/
221221

222222
.. _local_development_installation:
223223

224-
Local development installation
225-
------------------------------
224+
Local development
225+
-----------------
226226

227227
Supported Platforms
228228
^^^^^^^^^^^^^^^^^^^
@@ -247,7 +247,7 @@ Before you install ScanCode.io, make sure you have the following prerequisites:
247247

248248
* **Python: versions 3.10 to 3.13** found at https://www.python.org/downloads/
249249
* **Git**: most recent release available at https://git-scm.com/
250-
* **PostgreSQL**: release 11 or later found at https://www.postgresql.org/ or
250+
* **PostgreSQL**: release 13 or later found at https://www.postgresql.org/ or
251251
https://postgresapp.com/ on macOS
252252

253253
.. _system_dependencies:

0 commit comments

Comments
 (0)