Skip to content

Commit

Permalink
Merge pull request #3413 from nexB/add-doc-redirects
Browse files Browse the repository at this point in the history
Add doc redirects
  • Loading branch information
AyanSinhaMahapatra authored May 26, 2023

Verified

This commit was signed with the committer’s verified signature.
pmccarren Patrick McCarren
2 parents 16cd9b4 + 179fff8 commit 4ec7a92
Showing 6 changed files with 32 additions and 14 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ License detection:
Similarly ``spdx_license_expressions`` was removed and replaced by
``detected_license_expression_spdx``.

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

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

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

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

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

- We replaced the ``scancode --reindex-licenses`` command line option with a
new separate command named ``scancode-reindex-licenses``.
11 changes: 10 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -21,16 +21,25 @@
copyright = "nexB Inc. and others."
author = "AboutCode.org authors and contributors"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.intersphinx",
"sphinx_reredirects",
]


# Redirects for olds pages
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
redirects = {
"explanations/index.html": "../reference/index.html",
"explanations/overview.html": "../reference/overview.html",
"explanations/license-detection-reference.html": "../reference/license-detection-reference.html"
}

# This points to aboutcode.readthedocs.io
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
6 changes: 6 additions & 0 deletions docs/source/contribute/contrib_doc.rst
Original file line number Diff line number Diff line change
@@ -303,6 +303,12 @@ Style Conventions for the Documentaion
``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are
frequently used in multiple files.

8. Redirects

If layouts of doc pages are being changed and these could be referenced elsewhere, these should
be added in the `redirects` mapping in `conf.py`. For examples on using these see
https://documatt.gitlab.io/sphinx-reredirects/usage.html

Converting from Markdown
------------------------

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ publicsuffix2==2.20191221
pyahocorasick==2.0.0
pycparser==2.21
pygmars==0.7.0
Pygments==2.12.0
Pygments==2.13.0
pymaven-patch==0.3.0
pyparsing==3.0.9
pytz==2022.1
12 changes: 7 additions & 5 deletions setup-mini.cfg
Original file line number Diff line number Diff line change
@@ -64,13 +64,13 @@ python_requires = >=3.7

install_requires =
attrs >= 18.1,!=20.1.0;python_version<'3.11'
attrs >= 22.1;python_version>='3.11'
attrs >= 22.1.0;python_version>='3.11'
Beautifulsoup4 >= 4.0.0
boolean.py >= 4.0
chardet >= 3.0.0
click >= 6.7, !=7.0
colorama >= 0.3.9
commoncode >= 31.0.0
commoncode >= 31.0.2
container-inspector >= 31.0.0
debian-inspector >= 31.0.0
dparse2 >= 0.7.0
@@ -97,7 +97,7 @@ install_requires =
pkginfo2 >= 30.0.0
pip-requirements-parser >= 32.0.1
pluggy >= 1.0.0
plugincode >= 31.0.0
plugincode >= 32.0.0
publicsuffix2
pyahocorasick >= 2.0.0
pygmars >= 0.7.0
@@ -129,15 +129,17 @@ testing =
pytest >= 6, != 7.0.0
pytest-xdist >= 2
aboutcode-toolkit >= 7.0.2
pycodestyle >= 2.8.0
twine
black
isort
vendorize >= 0.3.0
pytest-rerunfailures

docs =
Sphinx >= 3.3.1
sphinx-rtd-theme >= 0.5.0
Sphinx == 5.1.0
sphinx_rtd_theme >= 0.5.1
sphinx-reredirects >= 0.1.2
doc8 >= 0.8.1

# linux-only package handling
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -129,17 +129,18 @@ testing =
pytest >= 6, != 7.0.0
pytest-xdist >= 2
aboutcode-toolkit >= 7.0.2
pycodestyle >= 2.8.0
twine
black
isort
vendorize >= 0.3.0
pytest-rerunfailures

docs =
Sphinx == 5.3.0
Sphinx == 5.1.0
sphinx_rtd_theme >= 0.5.1
docutils < 0.17
doc8
sphinx-reredirects >= 0.1.2
doc8 >= 0.8.1

# linux-only package handling
packages =

0 comments on commit 4ec7a92

Please sign in to comment.