Skip to content

Commit 0d7f192

Browse files
committed
Merge remote-tracking branch 'skeleton/main' into update-skeleton-files
2 parents 4d6f4e1 + 8b1757b commit 0d7f192

18 files changed

Lines changed: 217 additions & 66 deletions

.github/workflows/docs-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

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

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

.github/workflows/pypi-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
runs-on: ubuntu-20.04
2525

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

@@ -78,6 +78,6 @@ jobs:
7878

7979
- name: Publish to PyPI
8080
if: startsWith(github.ref, 'refs/tags')
81-
uses: pypa/gh-action-pypi-publish@master
81+
uses: pypa/gh-action-pypi-publish@release/v1
8282
with:
8383
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.py[cod]
33

44
# virtualenv and other misc bits
5+
/src/*.egg-info
56
*.egg-info
67
/dist
78
/build

.readthedocs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
# Required
66
version: 2
77

8+
# Build in latest ubuntu/python
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
14+
# Build PDF & ePub
15+
formats:
16+
- epub
17+
- pdf
18+
819
# Where the Sphinx conf.py file is located
920
sphinx:
1021
configuration: docs/source/conf.py

Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) nexB Inc. and others. All rights reserved.
4+
# ScanCode is a trademark of nexB Inc.
5+
# SPDX-License-Identifier: Apache-2.0
6+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7+
# See https://github.com/nexB/skeleton for support or download.
8+
# See https://aboutcode.org for more information about nexB OSS projects.
9+
#
10+
11+
# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
12+
PYTHON_EXE?=python3
13+
VENV=venv
14+
ACTIVATE?=. ${VENV}/bin/activate;
15+
16+
dev:
17+
@echo "-> Configure the development envt."
18+
./configure --dev
19+
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
27+
28+
doc8:
29+
@echo "-> Run doc8 validation"
30+
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
31+
32+
valid: isort black
33+
34+
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
41+
42+
clean:
43+
@echo "-> Clean the Python env"
44+
./configure --clean
45+
46+
test:
47+
@echo "-> Run the test suite"
48+
${VENV}/bin/pytest -vvs
49+
50+
docs:
51+
rm -rf docs/_build/
52+
@${ACTIVATE} sphinx-build docs/ docs/_build/
53+
54+
.PHONY: conf dev check valid black isort clean test docs

azure-pipelines.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,56 @@ jobs:
99

1010
- template: etc/ci/azure-posix.yml
1111
parameters:
12-
job_name: ubuntu18_cpython
13-
image_name: ubuntu-18.04
14-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
12+
job_name: ubuntu20_cpython
13+
image_name: ubuntu-20.04
14+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
1515
test_suites:
1616
all: venv/bin/pytest -n 2 -vvs
1717

1818
- template: etc/ci/azure-posix.yml
1919
parameters:
20-
job_name: ubuntu20_cpython
21-
image_name: ubuntu-20.04
22-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
20+
job_name: ubuntu22_cpython
21+
image_name: ubuntu-22.04
22+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
2323
test_suites:
2424
all: venv/bin/pytest -n 2 -vvs
2525

2626
- template: etc/ci/azure-posix.yml
2727
parameters:
2828
job_name: macos11_cpython
29-
image_name: macos-11
30-
python_versions: ['3.7', '3.8', '3.9', '3.10']
29+
image_name: macOS-11
30+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
31+
test_suites:
32+
all: venv/bin/pytest -n 2 -vvs
33+
34+
- template: etc/ci/azure-posix.yml
35+
parameters:
36+
job_name: macos12_cpython
37+
image_name: macOS-12
38+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
39+
test_suites:
40+
all: venv/bin/pytest -n 2 -vvs
41+
42+
- template: etc/ci/azure-posix.yml
43+
parameters:
44+
job_name: macos13_cpython
45+
image_name: macOS-13
46+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3147
test_suites:
3248
all: venv/bin/pytest -n 2 -vvs
3349

3450
- template: etc/ci/azure-win.yml
3551
parameters:
3652
job_name: win2019_cpython
3753
image_name: windows-2019
38-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
54+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3955
test_suites:
4056
all: venv\Scripts\pytest -n 2 -vvs
4157

4258
- template: etc/ci/azure-win.yml
4359
parameters:
4460
job_name: win2022_cpython
4561
image_name: windows-2022
46-
python_versions: ['3.7', '3.8', '3.9', '3.10']
62+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
4763
test_suites:
4864
all: venv\Scripts\pytest -n 2 -vvs

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"
3636
VIRTUALENV_DIR=venv
3737

3838
# Cleanable files and directories to delete with the --clean option
39-
CLEANABLE="build venv"
39+
CLEANABLE="build dist venv .cache .eggs"
4040

4141
# extra arguments passed to pip
4242
PIP_EXTRA_ARGS=" "

configure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"
3434
set "VIRTUALENV_DIR=venv"
3535

3636
@rem # Cleanable files and directories to delete with the --clean option
37-
set "CLEANABLE=build venv"
37+
set "CLEANABLE=build dist venv .cache .eggs"
3838

3939
@rem # extra arguments passed to pip
4040
set "PIP_EXTRA_ARGS= "

docs/source/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@
2929
# ones.
3030
extensions = [
3131
"sphinx.ext.intersphinx",
32+
"sphinx_reredirects",
3233
]
3334

35+
36+
# Redirects for olds pages
37+
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
38+
redirects = {}
39+
3440
# This points to aboutcode.readthedocs.io
3541
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
3642
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
@@ -95,3 +101,9 @@
95101
.. role:: img-title-para
96102
97103
"""
104+
105+
# -- Options for LaTeX output -------------------------------------------------
106+
107+
latex_elements = {
108+
'classoptions': ',openany,oneside'
109+
}

etc/scripts/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Pre-requisites
2121
virtualenv or in the the main configured development virtualenv.
2222
These requireements need to be installed::
2323

24-
pip install --requirement etc/release/requirements.txt
24+
pip install --requirement etc/scripts/requirements.txt
2525

2626
TODO: we need to pin the versions of these tools
2727

@@ -34,7 +34,7 @@ Scripts
3434
~~~~~~~
3535

3636
**gen_requirements.py**: create/update requirements files from currently
37-
installed requirements.
37+
installed requirements.
3838

3939
**gen_requirements_dev.py** does the same but can subtract the main requirements
4040
to get extra requirements used in only development.
@@ -50,7 +50,7 @@ The sequence of commands to run are:
5050

5151
./configure --clean
5252
./configure
53-
python etc/release/gen_requirements.py --site-packages-dir <path to site-packages dir>
53+
python etc/scripts/gen_requirements.py --site-packages-dir <path to site-packages dir>
5454

5555
* You can optionally install or update extra main requirements after the
5656
./configure step such that these are included in the generated main requirements.
@@ -59,7 +59,7 @@ The sequence of commands to run are:
5959

6060
./configure --clean
6161
./configure --dev
62-
python etc/release/gen_requirements_dev.py --site-packages-dir <path to site-packages dir>
62+
python etc/scripts/gen_requirements_dev.py --site-packages-dir <path to site-packages dir>
6363

6464
* You can optionally install or update extra dev requirements after the
6565
./configure step such that these are included in the generated dev

0 commit comments

Comments
 (0)