Skip to content

Commit 97b0e2c

Browse files
Merge remote-tracking branch 'skeleton/main'
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
2 parents 0e404cd + fb75a2e commit 97b0e2c

28 files changed

+322
-284
lines changed

.github/workflows/pypi-release.yml

Lines changed: 17 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-22.04
24+
runs-on: ubuntu-24.04
2525

2626
steps:
2727
- uses: actions/checkout@v4
2828
- name: Set up Python
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3030
with:
3131
python-version: 3.14
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-22.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,17 +70,18 @@ jobs:
6770
name: Create PyPI release
6871
needs:
6972
- create-gh-release
70-
runs-on: ubuntu-22.04
73+
runs-on: ubuntu-24.04
74+
environment: pypi-publish
75+
permissions:
76+
id-token: write
7177

7278
steps:
7379
- name: Download built archives
74-
uses: actions/download-artifact@v3
80+
uses: actions/download-artifact@v4
7581
with:
7682
name: pypi_archives
7783
path: dist
7884

7985
- name: Publish to PyPI
8086
if: startsWith(github.ref, 'refs/tags')
8187
uses: pypa/gh-action-pypi-publish@release/v1
82-
with:
83-
password: ${{ secrets.PYPI_API_TOKEN }}

.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version: 2
77

88
# Build in latest ubuntu/python
99
build:
10-
os: ubuntu-24.04
10+
os: ubuntu-22.04
1111
tools:
12-
python: "3.12"
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

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 .git*
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ test:
5757

5858
docs:
5959
rm -rf docs/_build/
60-
@${ACTIVATE} sphinx-build docs/ docs/_build/
60+
@${ACTIVATE} sphinx-build docs/source docs/_build/
6161

62-
.PHONY: conf dev check valid black isort clean test docs
62+
docs-check:
63+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
64+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
65+
66+
.PHONY: conf dev check valid clean test docs docs-check

azure-pipelines.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
jobs:
99

10+
- template: etc/ci/azure-posix.yml
11+
parameters:
12+
job_name: run_code_checks
13+
image_name: ubuntu-24.04
14+
python_versions: ['3.14']
15+
test_suites:
16+
all: make check
17+
1018
- template: etc/ci/azure-posix.yml
1119
parameters:
1220
job_name: ubuntu20_cpython

configure

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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=" "
@@ -111,7 +110,7 @@ create_virtualenv() {
111110
fi
112111

113112
$PYTHON_EXECUTABLE "$VIRTUALENV_PYZ" \
114-
--wheel embed --pip embed --setuptools embed \
113+
--pip embed --setuptools embed \
115114
--seeder pip \
116115
--never-download \
117116
--no-periodic-update \
@@ -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: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
)
@@ -114,7 +110,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (
114110

115111
if exist "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" (
116112
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
117-
--wheel embed --pip embed --setuptools embed ^
113+
--pip embed --setuptools embed ^
118114
--seeder pip ^
119115
--never-download ^
120116
--no-periodic-update ^
@@ -130,7 +126,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (
130126
)
131127
)
132128
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
133-
--wheel embed --pip embed --setuptools embed ^
129+
--pip embed --setuptools embed ^
134130
--seeder pip ^
135131
--never-download ^
136132
--no-periodic-update ^

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
88
SPHINXAUTOBUILD = sphinx-autobuild
99
SOURCEDIR = source
10-
BUILDDIR = build
10+
BUILDDIR = _build
1111

1212
# Put it first so that "make" without argument is like "make help".
1313
help:

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = "nexb-skeleton"
21-
copyright = "nexB Inc. and others."
21+
copyright = "nexB Inc., AboutCode and others."
2222
author = "AboutCode.org authors and contributors"
2323

2424

@@ -94,7 +94,8 @@
9494
html_show_sphinx = True
9595

9696
# Define CSS and HTML abbreviations used in .rst files. These are examples.
97-
# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text`
97+
# .. role:: is used to refer to styles defined in _static/theme_overrides.css
98+
# and is used like this: :red:`text`
9899
rst_prolog = """
99100
.. |psf| replace:: Python Software Foundation
100101

0 commit comments

Comments
 (0)