Skip to content

Commit 41884fe

Browse files
authored
Merge pull request #65 from aboutcode-org/update-skeleton
Update skeleton Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
2 parents 1f96f66 + 0b600fd commit 41884fe

33 files changed

Lines changed: 484 additions & 809 deletions

.github/workflows/docs-ci.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,27 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-24.04
88

99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.9]
12+
python-version: [3.13]
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

23-
- name: Give permission to run scripts
24-
run: chmod +x ./docs/scripts/doc8_style_check.sh
25-
2623
- name: Install Dependencies
27-
run: pip install -e .[docs]
28-
29-
- name: Check Sphinx Documentation build minimally
30-
working-directory: ./docs
31-
run: sphinx-build -E -W source build
32-
33-
- name: Check for documentation style errors
34-
working-directory: ./docs
35-
run: ./scripts/doc8_style_check.sh
24+
run: ./configure --dev
3625

26+
- name: Check documentation and HTML for errors and dead links
27+
run: make docs-check
3728

29+
- name: Check documentation for style errors
30+
run: make doc8

.github/workflows/pypi-release.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,26 @@ on:
2121
jobs:
2222
build-pypi-distribs:
2323
name: Build and publish library to PyPI
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-24.04
2525

2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
- name: Set up Python
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.9
31+
python-version: 3.12
3232

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

3636
- name: Build a binary wheel and a source tarball
37-
run: python -m build --sdist --wheel --outdir dist/
37+
run: python -m build --wheel --sdist --outdir dist/
38+
39+
- name: Validate wheel and sdis for Pypi
40+
run: python -m twine check dist/*
3841

3942
- name: Upload built archives
40-
uses: actions/upload-artifact@v3
43+
uses: actions/upload-artifact@v4
4144
with:
4245
name: pypi_archives
4346
path: dist/*
@@ -47,17 +50,17 @@ jobs:
4750
name: Create GH release
4851
needs:
4952
- build-pypi-distribs
50-
runs-on: ubuntu-20.04
53+
runs-on: ubuntu-24.04
5154

5255
steps:
5356
- name: Download built archives
54-
uses: actions/download-artifact@v3
57+
uses: actions/download-artifact@v4
5558
with:
5659
name: pypi_archives
5760
path: dist
5861

5962
- name: Create GH release
60-
uses: softprops/action-gh-release@v1
63+
uses: softprops/action-gh-release@v2
6164
with:
6265
draft: true
6366
files: dist/*
@@ -67,11 +70,11 @@ jobs:
6770
name: Create PyPI release
6871
needs:
6972
- create-gh-release
70-
runs-on: ubuntu-20.04
73+
runs-on: ubuntu-24.04
7174

7275
steps:
7376
- name: Download built archives
74-
uses: actions/download-artifact@v3
77+
uses: actions/download-artifact@v4
7578
with:
7679
name: pypi_archives
7780
path: dist

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ python:
2626
- method: pip
2727
path: .
2828
extra_requirements:
29-
- docs
29+
- dev

MANIFEST.in

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
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+
12+
13+
include .git*
14+
include *.png
915
include setup.*
1016
include configure*
1117
include requirements*
12-
include .git*
18+
include .dockerignore
19+
include .gitignore
20+
include .readthedocs.yml
21+
include manage.py
22+
include Dockerfile*
23+
include Makefile
24+
include MANIFEST.in
1325

14-
global-exclude *.py[co] __pycache__ *.*~
26+
include .VERSION
1527

28+
global-exclude *.py[co] __pycache__ *.*~

Makefile

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# SPDX-License-Identifier: Apache-2.0
21
#
32
# Copyright (c) nexB Inc. and others. All rights reserved.
43
# ScanCode is a trademark of nexB Inc.
54
# SPDX-License-Identifier: Apache-2.0
65
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
# See https://github.com/nexB/skeleton for support or download.
6+
# See https://github.com/aboutcode-org/skeleton for support or download.
87
# See https://aboutcode.org for more information about nexB OSS projects.
98
#
109

@@ -13,31 +12,33 @@ PYTHON_EXE?=python3
1312
VENV=venv
1413
ACTIVATE?=. ${VENV}/bin/activate;
1514

16-
dev:
17-
@echo "-> Configure the development envt."
18-
./configure --dev
1915

20-
isort:
21-
@echo "-> Apply isort changes to ensure proper imports ordering"
22-
${VENV}/bin/isort --sl -l 100 src tests setup.py
16+
conf:
17+
@echo "-> Install dependencies"
18+
./configure
2319

24-
black:
25-
@echo "-> Apply black code formatter"
26-
${VENV}/bin/black -l 100 src tests setup.py
20+
dev:
21+
@echo "-> Configure and install development dependencies"
22+
./configure --dev
2723

2824
doc8:
2925
@echo "-> Run doc8 validation"
30-
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
26+
@${ACTIVATE} doc8 --quiet docs/ *.rst
3127

32-
valid: isort black
28+
valid:
29+
@echo "-> Run Ruff format"
30+
@${ACTIVATE} ruff format
31+
@echo "-> Run Ruff linter"
32+
@${ACTIVATE} ruff check --fix
3333

3434
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
35+
@echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)"
36+
@${ACTIVATE} ruff check
37+
@echo "-> Run Ruff format validation"
38+
@${ACTIVATE} ruff format --check
39+
@$(MAKE) doc8
40+
@echo "-> Run ABOUT files validation"
41+
@${ACTIVATE} about check etc/
4142

4243
clean:
4344
@echo "-> Clean the Python env"
@@ -49,6 +50,10 @@ test:
4950

5051
docs:
5152
rm -rf docs/_build/
52-
@${ACTIVATE} sphinx-build docs/ docs/_build/
53+
@${ACTIVATE} sphinx-build docs/source docs/_build/
54+
55+
docs-check:
56+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
57+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
5358

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

README-dev.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,21 @@ And then run::
5252
And review the ``nuget-inspector.json`` JSON output file with its resolved dependencies.
5353
Note that the output data structure is evolving and not final.
5454

55+
Developement
56+
-------------
57+
58+
Getting started for development:
59+
60+
- Install the .NET SDK 6.x from https://dotnet.microsoft.com/en-us/download/dotnet/6.0
61+
- Install the VSCode from https://code.visualstudio.com/
62+
- Install the extension: C# for Visual Studio Code (powered by OmniSharp)
63+
from https://code.visualstudio.com/Docs/languages/csharp
64+
65+
To run the tests:
5566

67+
- Run ``./build.sh`` to create a Linux build
68+
- Run ``./configure --dev`` once to setup the Python evnvironment used for testing
69+
- Run pytest with: ``venv/bin/pytest -vvs``
5670

5771
License
5872
-------------

azure-pipelines.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,59 @@
55
################################################################################
66

77
jobs:
8+
89
- template: etc/ci/azure-posix.yml
910
parameters:
1011
job_name: ubuntu22_cpython
1112
image_name: ubuntu-22.04
12-
python_versions: ['3.8', '3.9', '3.10', '3.11']
13+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
14+
test_suites:
15+
all: venv/bin/pytest -n 2 -vvs
16+
17+
- template: etc/ci/azure-posix.yml
18+
parameters:
19+
job_name: ubuntu24_cpython
20+
image_name: ubuntu-24.04
21+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
1322
test_suites:
1423
all: venv/bin/pytest -n 2 -vvs
1524

1625
- template: etc/ci/azure-posix.yml
1726
parameters:
1827
job_name: macos13_cpython
1928
image_name: macOS-13
20-
python_versions: ['3.8', '3.9', '3.10', '3.11']
29+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
2130
test_suites:
2231
all: venv/bin/pytest -n 2 -vvs
2332

24-
- template: etc/ci/azure-win.yml
33+
- template: etc/ci/azure-posix.yml
2534
parameters:
26-
job_name: win2019_cpython
27-
image_name: windows-2019
28-
python_versions: ['3.8', '3.9', '3.10', '3.11']
35+
job_name: macos14_cpython
36+
image_name: macOS-14
37+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
2938
test_suites:
30-
all: venv\Scripts\pytest -n 2 -vvs
39+
all: venv/bin/pytest -n 2 -vvs
40+
41+
- template: etc/ci/azure-posix.yml
42+
parameters:
43+
job_name: macos15_cpython
44+
image_name: macOS-15
45+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
46+
test_suites:
47+
all: venv/bin/pytest -n 2 -vvs
3148

3249
- template: etc/ci/azure-win.yml
3350
parameters:
3451
job_name: win2022_cpython
3552
image_name: windows-2022
36-
python_versions: ['3.8', '3.9', '3.10', '3.11']
53+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
54+
test_suites:
55+
all: venv\Scripts\pytest -n 2 -vvs
56+
57+
- template: etc/ci/azure-win.yml
58+
parameters:
59+
job_name: win2025_cpython
60+
image_name: windows-2025
61+
python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
3762
test_suites:
3863
all: venv\Scripts\pytest -n 2 -vvs

configure

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

1010
set -e
1111
#set -x
1212

13+
# we are doing a dotnet publish from src/nuget-inspector/nuget-inspector.csproj
14+
bash ./build.sh
15+
1316
################################
1417
# A configuration script to set things up:
1518
# create a virtualenv and install or update thirdparty packages.
@@ -29,14 +32,13 @@ CLI_ARGS=$1
2932

3033
# Requirement arguments passed to pip and used by default or with --dev.
3134
REQUIREMENTS="--editable . --constraint requirements.txt"
32-
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
33-
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"
35+
DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
3436

3537
# where we create a virtualenv
3638
VIRTUALENV_DIR=venv
3739

3840
# Cleanable files and directories to delete with the --clean option
39-
CLEANABLE="build dist venv .cache .eggs"
41+
CLEANABLE="build dist venv .cache .eggs *.egg-info docs/_build/ pip-selfcheck.json"
4042

4143
# extra arguments passed to pip
4244
PIP_EXTRA_ARGS=" "
@@ -111,7 +113,7 @@ create_virtualenv() {
111113
fi
112114

113115
$PYTHON_EXECUTABLE "$VIRTUALENV_PYZ" \
114-
--wheel embed --pip embed --setuptools embed \
116+
--pip embed --setuptools embed \
115117
--seeder pip \
116118
--never-download \
117119
--no-periodic-update \
@@ -168,6 +170,7 @@ clean() {
168170
for cln in $CLEANABLE;
169171
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
170172
done
173+
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
171174
set +e
172175
exit
173176
}
@@ -185,7 +188,6 @@ while getopts :-: optchar; do
185188
help ) cli_help;;
186189
clean ) find_python && clean;;
187190
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
188-
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
189191
esac;;
190192
esac
191193
done

0 commit comments

Comments
 (0)