Skip to content

Commit a181768

Browse files
Merge pull request #74 from aboutcode-org/release-prep-v31.1.0
Release prep v31.1.0
2 parents db9dd08 + a6b3599 commit a181768

61 files changed

Lines changed: 4742 additions & 3867 deletions

Some content is hidden

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

.github/workflows/docs-ci.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,34 @@ name: CI Documentation
22

33
on: [push, pull_request]
44

5+
permissions: {}
56
jobs:
67
build:
7-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-24.04
89

910
strategy:
1011
max-parallel: 4
1112
matrix:
12-
python-version: [3.9]
13+
python-version: [3.13]
1314

1415
steps:
1516
- name: Checkout code
16-
uses: actions/checkout@v3
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+
with:
19+
persist-credentials: false
1720

1821
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2023
with:
2124
python-version: ${{ matrix.python-version }}
2225

23-
- name: Give permission to run scripts
24-
run: chmod +x ./docs/scripts/doc8_style_check.sh
25-
2626
- name: Install Dependencies
27-
run: pip install -e .[docs]
27+
run: ./configure --dev
2828

29-
- name: Check Sphinx Documentation build minimally
30-
working-directory: ./docs
31-
run: sphinx-build -E -W source build
29+
- name: Check documentation and HTML for errors and dead links
30+
run: make docs-check
3231

33-
- name: Check for documentation style errors
34-
working-directory: ./docs
35-
run: ./scripts/doc8_style_check.sh
32+
- name: Check documentation for style errors
33+
run: make doc8
3634

3735

.github/workflows/pypi-release.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,32 @@ on:
1818
tags:
1919
- "v*.*.*"
2020

21+
permissions: {}
2122
jobs:
2223
build-pypi-distribs:
2324
name: Build and publish library to PyPI
24-
runs-on: ubuntu-20.04
25+
runs-on: ubuntu-24.04
2526

2627
steps:
27-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
29+
with:
30+
persist-credentials: false
2831
- name: Set up Python
29-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3033
with:
31-
python-version: 3.9
34+
python-version: 3.12
3235

33-
- name: Install pypa/build
34-
run: python -m pip install build --user
36+
- name: Install pypa/build and twine
37+
run: python -m pip install --user --upgrade build twine pkginfo
3538

3639
- name: Build a binary wheel and a source tarball
37-
run: python -m build --sdist --wheel --outdir dist/
40+
run: python -m build --wheel --sdist --outdir dist/
41+
42+
- name: Validate wheel and sdis for Pypi
43+
run: python -m twine check dist/*
3844

3945
- name: Upload built archives
40-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
4147
with:
4248
name: pypi_archives
4349
path: dist/*
@@ -47,17 +53,17 @@ jobs:
4753
name: Create GH release
4854
needs:
4955
- build-pypi-distribs
50-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-24.04
5157

5258
steps:
5359
- name: Download built archives
54-
uses: actions/download-artifact@v3
60+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
5561
with:
5662
name: pypi_archives
5763
path: dist
5864

5965
- name: Create GH release
60-
uses: softprops/action-gh-release@v1
66+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
6167
with:
6268
draft: true
6369
files: dist/*
@@ -67,17 +73,18 @@ jobs:
6773
name: Create PyPI release
6874
needs:
6975
- create-gh-release
70-
runs-on: ubuntu-20.04
76+
runs-on: ubuntu-24.04
77+
environment: pypi-publish
78+
permissions:
79+
id-token: write
7180

7281
steps:
7382
- name: Download built archives
74-
uses: actions/download-artifact@v3
83+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
7584
with:
7685
name: pypi_archives
7786
path: dist
7887

7988
- name: Publish to PyPI
8089
if: startsWith(github.ref, 'refs/tags')
81-
uses: pypa/gh-action-pypi-publish@release/v1
82-
with:
83-
password: ${{ secrets.PYPI_API_TOKEN }}
90+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI on Linux ARM and MacOS Intel
2+
3+
on: [push]
4+
5+
permissions: {}
6+
jobs:
7+
8+
test_on_linux_arm:
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
name: Test PyPI wheels on linux
13+
runs-on: ${{ matrix.os }}
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
os: [ubuntu-24.04-arm]
23+
pyver: ["3.10", "3.11", "3.12", "3.13", "3.14"]
24+
25+
steps:
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
27+
with:
28+
persist-credentials: false
29+
30+
- name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }}
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
32+
with:
33+
python-version: ${{ matrix.pyver }}
34+
35+
- name: Configure and setup test environment
36+
run: |
37+
sudo apt update
38+
sudo chmod 0644 /boot/vmlinuz-* && sudo apt install libguestfs-tools
39+
./configure --clean && ./configure --dev-system-provided
40+
41+
- name: Run tests
42+
run: |
43+
make test
44+
45+
46+
test_on_macos_intel:
47+
permissions:
48+
contents: read # to fetch code (actions/checkout)
49+
50+
name: Test PyPI wheels on linux
51+
runs-on: ${{ matrix.os }}
52+
53+
defaults:
54+
run:
55+
shell: bash
56+
57+
strategy:
58+
fail-fast: true
59+
matrix:
60+
os: [macos-15-intel]
61+
pyver: ["3.10", "3.11", "3.12", "3.13", "3.14"]
62+
63+
steps:
64+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
65+
with:
66+
persist-credentials: false
67+
68+
- name: Set up Python ${{ matrix.pyver }} on ${{ matrix.os }}
69+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
70+
with:
71+
python-version: ${{ matrix.pyver }}
72+
73+
- name: Configure and setup test environment
74+
run: |
75+
./configure --clean && ./configure --dev
76+
77+
- name: Run tests
78+
run: |
79+
make test

.github/workflows/zizmor.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
permissions: {}
10+
11+
jobs:
12+
zizmor:
13+
name: Run zizmor 🌈
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
persist-credentials: false
22+
23+
- name: Run zizmor 🌈
24+
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ tcl
7272

7373
# Ignore Jupyter Notebook related temp files
7474
.ipynb_checkpoints/
75+
/.ruff_cache/
76+
.env

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.11"
12+
python: "3.13"
1313

1414
# Build PDF & ePub
1515
formats:
@@ -26,4 +26,4 @@ python:
2626
- method: pip
2727
path: .
2828
extra_requirements:
29-
- docs
29+
- dev

AUTHORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ The following organizations or individuals have contributed to this repo:
1010
- Qingmin Duanmu @qduanmu
1111
- Rakesh Balusa @balusarakesh
1212
- Ravi Jain @JRavi2
13-
- Steven Esser @majurg
13+
- Steven Esser @majurg

MANIFEST.in

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
graft src
2+
graft docs
3+
graft etc
24

35
include *.LICENSE
46
include NOTICE
57
include *.ABOUT
68
include *.toml
79
include *.yml
810
include *.rst
11+
include *.png
912
include setup.*
1013
include configure*
1114
include requirements*
12-
include .giti*
15+
include .dockerignore
16+
include .gitignore
17+
include .readthedocs.yml
18+
include manage.py
19+
include Dockerfile*
20+
include Makefile
21+
include MANIFEST.in
1322

14-
include extractcode*
23+
include .VERSION
1524

1625
global-exclude *.py[co] __pycache__ *.*~
17-

Makefile

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ScanCode is a trademark of nexB Inc.
55
# SPDX-License-Identifier: Apache-2.0
66
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
# See https://github.com/nexB/skeleton for support or download.
7+
# See https://github.com/aboutcode-org/skeleton for support or download.
88
# See https://aboutcode.org for more information about nexB OSS projects.
99
#
1010

@@ -13,31 +13,37 @@ PYTHON_EXE?=python3
1313
VENV=venv
1414
ACTIVATE?=. ${VENV}/bin/activate;
1515

16+
17+
conf:
18+
@echo "-> Install dependencies"
19+
./configure
20+
1621
dev:
17-
@echo "-> Configure the development envt."
22+
@echo "-> Configure and install development dependencies"
1823
./configure --dev
1924

20-
isort:
21-
@echo "-> Apply isort changes to ensure proper imports ordering"
22-
${VENV}/bin/isort --sl -l 100 src tests setup.py
23-
24-
black:
25-
@echo "-> Apply black code formatter"
26-
${VENV}/bin/black -l 100 src tests setup.py
25+
dev-system-provided:
26+
@echo "-> Configure and install development dependencies"
27+
./configure --dev-system-provided
2728

2829
doc8:
2930
@echo "-> Run doc8 validation"
30-
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
31+
@${ACTIVATE} doc8 --quiet docs/ *.rst
3132

32-
valid: isort black
33+
valid:
34+
@echo "-> Run Ruff format"
35+
@${ACTIVATE} ruff format
36+
@echo "-> Run Ruff linter"
37+
@${ACTIVATE} ruff check --fix
3338

3439
check:
35-
@echo "-> Run pycodestyle (PEP8) validation"
36-
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
37-
@echo "-> Run isort imports ordering validation"
38-
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
39-
@echo "-> Run black validation"
40-
@${ACTIVATE} black --check --check -l 100 src tests setup.py
40+
@echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)"
41+
@${ACTIVATE} ruff check
42+
@echo "-> Run Ruff format validation"
43+
@${ACTIVATE} ruff format --check
44+
@$(MAKE) doc8
45+
@echo "-> Run ABOUT files validation"
46+
@${ACTIVATE} about check etc/
4147

4248
clean:
4349
@echo "-> Clean the Python env"
@@ -49,6 +55,10 @@ test:
4955

5056
docs:
5157
rm -rf docs/_build/
52-
@${ACTIVATE} sphinx-build docs/ docs/_build/
58+
@${ACTIVATE} sphinx-build docs/source docs/_build/
59+
60+
docs-check:
61+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
62+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
5363

54-
.PHONY: conf dev check valid black isort clean test docs
64+
.PHONY: conf dev check valid clean test docs docs-check

NOTICE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#
22
# Copyright (c) nexB Inc. and others. All rights reserved.
3-
# ScanCode is a trademark of nexB Inc.
43
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
6+
# ScanCode is a trademark of nexB Inc.
57
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
68
# See https://github.com/nexB/extractcode for support or download.
79
# See https://aboutcode.org for more information about nexB OSS projects.

0 commit comments

Comments
 (0)