Skip to content

Commit 345bdf8

Browse files
Merge remote-tracking branch 'skeleton/main' into sync-licenses
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents e4fe0dc + af7e542 commit 345bdf8

File tree

9 files changed

+80
-14
lines changed

9 files changed

+80
-14
lines changed

.github/workflows/docs-ci.yml

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

23-
- name: Give permission to run scripts
24-
run: chmod +x ./docs/scripts/doc8_style_check.sh
25-
2623
- name: Install Dependencies
2724
run: pip install -e .[docs]
2825

.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

@@ -81,6 +81,6 @@ jobs:
8181

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

.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

azure-pipelines.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,23 @@ jobs:
2626
- template: etc/ci/azure-posix.yml
2727
parameters:
2828
job_name: macos11_cpython
29-
image_name: macos-11
29+
image_name: macOS-11
3030
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3131
test_suites:
3232
all: venv/bin/pytest -n 2 -vvs
3333

3434
- template: etc/ci/azure-posix.yml
3535
parameters:
3636
job_name: macos12_cpython
37-
image_name: macos-12
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
3846
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3947
test_suites:
4048
all: venv/bin/pytest -n 2 -vvs

docs/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# from the environment for the first two.
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
8+
SPHINXAUTOBUILD = sphinx-autobuild
89
SOURCEDIR = source
910
BUILDDIR = build
1011

@@ -14,6 +15,13 @@ help:
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/scripts/doc8_style_check.sh

100644100755
File mode changed.

docs/source/conf.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,32 @@
3131
"sphinx.ext.autodoc",
3232
"sphinx.ext.intersphinx",
3333
"sphinxcontrib.apidoc",
34+
"sphinx_reredirects",
35+
'sphinx_rtd_theme',
36+
"sphinx_rtd_dark_mode",
37+
"sphinx.ext.extlinks",
38+
"sphinx_copybutton",
3439
]
3540

3641
# FIXME: including AND, NOT and OR will result in endless recursion
3742
autodoc_default_options = {
3843
'exclude-members': 'AND, NOT, OR',
3944
}
4045

46+
47+
# Redirects for olds pages
48+
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
49+
redirects = {}
50+
51+
# This points to aboutcode.readthedocs.io
52+
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
53+
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
54+
55+
intersphinx_mapping = {
56+
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
57+
"scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
58+
}
59+
4160
# Setting for sphinxcontrib.apidoc to automatically create API documentation.
4261
apidoc_module_dir = srcdir.joinpath('license_expression').as_posix()
4362

@@ -101,3 +120,9 @@
101120
.. role:: img-title-para
102121
103122
"""
123+
124+
# -- Options for LaTeX output -------------------------------------------------
125+
126+
latex_elements = {
127+
'classoptions': ',openany,oneside'
128+
}

setup.cfg

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ testing =
6868
isort
6969

7070
docs =
71-
Sphinx == 5.1.0
72-
sphinx-rtd-theme >= 0.5.0
73-
sphinxcontrib-apidoc >= 0.3.0
74-
doc8 >= 0.8.1
71+
Sphinx>=5.0.2
72+
sphinx-rtd-theme>=1.0.0
73+
sphinxcontrib-apidoc >= 0.4.0
74+
sphinx-reredirects >= 0.1.2
75+
doc8>=0.11.2
76+
sphinx-autobuild
77+
sphinx-rtd-dark-mode>=1.3.0
78+
sphinx-copybutton
79+

0 commit comments

Comments
 (0)