Skip to content

Commit 4ec7a92

Browse files
Merge pull request #3413 from nexB/add-doc-redirects
Add doc redirects
2 parents 16cd9b4 + 179fff8 commit 4ec7a92

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ License detection:
173173
Similarly ``spdx_license_expressions`` was removed and replaced by
174174
``detected_license_expression_spdx``.
175175

176-
- See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#change-in-license-data-format-resource>`_
176+
- See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/reference/license-detection-reference.html#change-in-license-data-format-resource>`_
177177
for examples and details.
178178

179179
- The data structure of license attributes in ``package_data`` and the codebase
@@ -193,15 +193,15 @@ License detection:
193193
original extracted license statement. Previously this used to be nested
194194
python objects lists/dicts/string, but now this is always a YAML string.
195195

196-
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#change-in-license-data-format-package>`_
196+
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/reference/license-detection-reference.html#change-in-license-data-format-package>`_
197197
for examples and details.
198198

199199
- The license matches structure has changed: we used to report one match for each
200200
license ``key`` of a matched license expression. We now report instead one
201201
single match for each matched license expression, and list the license keys
202202
as a ``licenses`` attribute. This avoids data duplication.
203203
Inside each match, we list each match and matched rule attributred directly
204-
avoiding nesting. See `license updates doc <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#licensematch-result-data>`_
204+
avoiding nesting. See `license updates doc <https://scancode-toolkit.readthedocs.io/en/latest/reference/license-detection-reference.html#licensematch-result-data>`_
205205
for examples and details.
206206

207207
- There are new and codebase level attributes with ``--license-references`` to report
@@ -212,7 +212,7 @@ License detection:
212212
in all levels i.e. from codebase, package and resource level license detections and
213213
resource level license clues, irrespective of this CLI option being used, i.e. default
214214
with ``--licenses``.
215-
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#comparision-before-after-license-references>`_
215+
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/reference/license-detection-reference.html#comparision-before-after-license-references>`_
216216

217217
- We replaced the ``scancode --reindex-licenses`` command line option with a
218218
new separate command named ``scancode-reindex-licenses``.

docs/source/conf.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,25 @@
2121
copyright = "nexB Inc. and others."
2222
author = "AboutCode.org authors and contributors"
2323

24-
2524
# -- General configuration ---------------------------------------------------
2625

2726
# Add any Sphinx extension module names here, as strings. They can be
2827
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2928
# ones.
3029
extensions = [
3130
"sphinx.ext.intersphinx",
31+
"sphinx_reredirects",
3232
]
3333

34+
35+
# Redirects for olds pages
36+
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
37+
redirects = {
38+
"explanations/index.html": "../reference/index.html",
39+
"explanations/overview.html": "../reference/overview.html",
40+
"explanations/license-detection-reference.html": "../reference/license-detection-reference.html"
41+
}
42+
3443
# This points to aboutcode.readthedocs.io
3544
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
3645
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83

docs/source/contribute/contrib_doc.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ Style Conventions for the Documentaion
303303
``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are
304304
frequently used in multiple files.
305305

306+
8. Redirects
307+
308+
If layouts of doc pages are being changed and these could be referenced elsewhere, these should
309+
be added in the `redirects` mapping in `conf.py`. For examples on using these see
310+
https://documatt.gitlab.io/sphinx-reredirects/usage.html
311+
306312
Converting from Markdown
307313
------------------------
308314

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ publicsuffix2==2.20191221
5454
pyahocorasick==2.0.0
5555
pycparser==2.21
5656
pygmars==0.7.0
57-
Pygments==2.12.0
57+
Pygments==2.13.0
5858
pymaven-patch==0.3.0
5959
pyparsing==3.0.9
6060
pytz==2022.1

setup-mini.cfg

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ python_requires = >=3.7
6464

6565
install_requires =
6666
attrs >= 18.1,!=20.1.0;python_version<'3.11'
67-
attrs >= 22.1;python_version>='3.11'
67+
attrs >= 22.1.0;python_version>='3.11'
6868
Beautifulsoup4 >= 4.0.0
6969
boolean.py >= 4.0
7070
chardet >= 3.0.0
7171
click >= 6.7, !=7.0
7272
colorama >= 0.3.9
73-
commoncode >= 31.0.0
73+
commoncode >= 31.0.2
7474
container-inspector >= 31.0.0
7575
debian-inspector >= 31.0.0
7676
dparse2 >= 0.7.0
@@ -97,7 +97,7 @@ install_requires =
9797
pkginfo2 >= 30.0.0
9898
pip-requirements-parser >= 32.0.1
9999
pluggy >= 1.0.0
100-
plugincode >= 31.0.0
100+
plugincode >= 32.0.0
101101
publicsuffix2
102102
pyahocorasick >= 2.0.0
103103
pygmars >= 0.7.0
@@ -129,15 +129,17 @@ testing =
129129
pytest >= 6, != 7.0.0
130130
pytest-xdist >= 2
131131
aboutcode-toolkit >= 7.0.2
132+
pycodestyle >= 2.8.0
132133
twine
133134
black
134135
isort
135136
vendorize >= 0.3.0
136137
pytest-rerunfailures
137138

138139
docs =
139-
Sphinx >= 3.3.1
140-
sphinx-rtd-theme >= 0.5.0
140+
Sphinx == 5.1.0
141+
sphinx_rtd_theme >= 0.5.1
142+
sphinx-reredirects >= 0.1.2
141143
doc8 >= 0.8.1
142144

143145
# linux-only package handling

setup.cfg

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,18 @@ testing =
129129
pytest >= 6, != 7.0.0
130130
pytest-xdist >= 2
131131
aboutcode-toolkit >= 7.0.2
132+
pycodestyle >= 2.8.0
132133
twine
133134
black
134135
isort
135136
vendorize >= 0.3.0
136137
pytest-rerunfailures
137138

138139
docs =
139-
Sphinx == 5.3.0
140+
Sphinx == 5.1.0
140141
sphinx_rtd_theme >= 0.5.1
141-
docutils < 0.17
142-
doc8
142+
sphinx-reredirects >= 0.1.2
143+
doc8 >= 0.8.1
143144

144145
# linux-only package handling
145146
packages =

0 commit comments

Comments
 (0)