Skip to content

Commit 81bf9c8

Browse files
committed
Merge remote-tracking branch 'skeleton/main' into merge_skeleton
2 parents 4684079 + 4f9751c commit 81bf9c8

27 files changed

+424
-217
lines changed

.github/workflows/docs-ci.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,29 @@ 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.12]
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]
24+
run: ./configure --dev
2825

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

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

3732

.github/workflows/pypi-release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,25 @@ 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@v4
2728
- uses: actions/checkout@v4
2829
- name: Set up Python
29-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v5
3031
with:
31-
python-version: 3.9
32+
python-version: 3.12
3233

33-
- name: Install pypa/build
34-
run: python -m pip install build --user
34+
- name: Install pypa/build and twine
35+
run: python -m pip install --user build twine
3536

3637
- name: Build a binary wheel and a source tarball
3738
run: python -m build --sdist --wheel --outdir dist/
3839

40+
- name: Validate wheel and sdis for Pypi
41+
run: python -m twine check dist/*
42+
3943
- name: Upload built archives
4044
uses: actions/upload-artifact@v4
4145
with:
@@ -47,17 +51,17 @@ jobs:
4751
name: Create GH release
4852
needs:
4953
- build-pypi-distribs
50-
runs-on: ubuntu-20.04
54+
runs-on: ubuntu-24.04
5155

5256
steps:
5357
- name: Download built archives
54-
uses: actions/download-artifact@v4.1.7
58+
uses: actions/download-artifact@v4
5559
with:
5660
name: pypi_archives
5761
path: dist
5862

5963
- name: Create GH release
60-
uses: softprops/action-gh-release@v1
64+
uses: softprops/action-gh-release@v2
6165
with:
6266
draft: true
6367
files: dist/*
@@ -67,11 +71,11 @@ jobs:
6771
name: Create PyPI release
6872
needs:
6973
- create-gh-release
70-
runs-on: ubuntu-20.04
74+
runs-on: ubuntu-24.04
7175

7276
steps:
7377
- name: Download built archives
74-
uses: actions/download-artifact@v4.1.7
78+
uses: actions/download-artifact@v4
7579
with:
7680
name: pypi_archives
7781
path: dist

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,5 @@ tcl
7373
# Ignore Jupyter Notebook related temp files
7474
.ipynb_checkpoints/
7575
/virtualenv.pyz
76+
/.ruff_cache/
77+
.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

AUTHORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
The following organizations or individuals have contributed to this repo:
22

3-
- nexB, Inc.
3+
-nexB, Inc.

MANIFEST.in

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +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-
global-exclude *.py[co] __pycache__ *.*~
23+
include .VERSION
1524

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

Makefile

Lines changed: 26 additions & 20 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,33 @@ PYTHON_EXE?=python3
1313
VENV=venv
1414
ACTIVATE?=. ${VENV}/bin/activate;
1515

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

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

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

2825
doc8:
2926
@echo "-> Run doc8 validation"
30-
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
27+
@${ACTIVATE} doc8 --quiet docs/ *.rst
3128

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

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

4244
clean:
4345
@echo "-> Clean the Python env"
@@ -49,6 +51,10 @@ test:
4951

5052
docs:
5153
rm -rf docs/_build/
52-
@${ACTIVATE} sphinx-build docs/ docs/_build/
54+
@${ACTIVATE} sphinx-build docs/source docs/_build/
55+
56+
docs-check:
57+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
58+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
5359

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

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
5+
# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
66
# ScanCode is a trademark of nexB Inc.
77
#
88
# Licensed under the Apache License, Version 2.0 (the "License");

configure

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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

@@ -29,14 +29,13 @@ CLI_ARGS=$1
2929

3030
# Requirement arguments passed to pip and used by default or with --dev.
3131
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"
32+
DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
3433

3534
# where we create a virtualenv
3635
VIRTUALENV_DIR=venv
3736

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

4140
# extra arguments passed to pip
4241
PIP_EXTRA_ARGS=" "
@@ -168,6 +167,7 @@ clean() {
168167
for cln in $CLEANABLE;
169168
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
170169
done
170+
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
171171
set +e
172172
exit
173173
}
@@ -185,7 +185,6 @@ while getopts :-: optchar; do
185185
help ) cli_help;;
186186
clean ) find_python && clean;;
187187
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
188-
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
189188
esac;;
190189
esac
191190
done

configure.bat

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

1010

@@ -27,8 +27,7 @@
2727

2828
@rem # Requirement arguments passed to pip and used by default or with --dev.
2929
set "REQUIREMENTS=--editable . --constraint requirements.txt"
30-
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
31-
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"
30+
set "DEV_REQUIREMENTS=--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
3231

3332
@rem # where we create a virtualenv
3433
set "VIRTUALENV_DIR=venv"
@@ -76,9 +75,6 @@ if not "%1" == "" (
7675
if "%1" EQU "--dev" (
7776
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
7877
)
79-
if "%1" EQU "--docs" (
80-
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
81-
)
8278
shift
8379
goto again
8480
)

docs/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8+
SPHINXAUTOBUILD = sphinx-autobuild
89
SOURCEDIR = source
9-
BUILDDIR = build
10+
BUILDDIR = _build
1011

1112
# Put it first so that "make" without argument is like "make help".
1213
help:
1314
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1415

1516
.PHONY: help Makefile
1617

18+
# Run the development server using sphinx-autobuild
19+
docs:
20+
@echo
21+
@echo "Starting up the docs server..."
22+
@echo
23+
$(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
24+
1725
# Catch-all target: route all unknown targets to Sphinx using the new
1826
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1927
%: Makefile

docs/make.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ REM Command file for Sphinx documentation
77
if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
10+
if "%SPHINXAUTOBUILD%" == "" (
11+
set SPHINXAUTOBUILD=sphinx-autobuild
12+
)
1013
set SOURCEDIR=source
1114
set BUILDDIR=build
1215

1316
if "%1" == "" goto help
1417

18+
if "%1" == "docs" goto docs
19+
1520
%SPHINXBUILD% >NUL 2>NUL
1621
if errorlevel 9009 (
1722
echo.
@@ -28,6 +33,13 @@ if errorlevel 9009 (
2833
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2934
goto end
3035

36+
:docs
37+
@echo
38+
@echo Starting up the docs server...
39+
@echo
40+
%SPHINXAUTOBUILD% --port 8000 --watch %SOURCEDIR% %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %O%
41+
goto end
42+
3143
:help
3244
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3345

docs/source/_static/theme_overrides.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,12 @@ div.custom-admonition-examples.admonition {
201201
/* max-width: 800px; */
202202
/* max-width: 1200px; */
203203
max-width: 100%;
204-
padding-right: 100px;
205-
padding-left: 100px;
206-
background-color: #f2f2f2;
204+
padding: 0px 40px 0px 0px;
205+
margin-top: 0px;
206+
}
207+
208+
.wy-nav-content-wrap {
209+
border-right: solid 1px;
207210
}
208211

209212
div.rst-content {

0 commit comments

Comments
 (0)