[DOC] Fix tox docs-linkcheck profile issues 65/117365/3
authorGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 2 Feb 2021 14:07:08 +0000 (15:07 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 2 Feb 2021 14:58:38 +0000 (15:58 +0100)
- ignore URLs logically unreachable such as about:config
- and create a code block for the git clone URL that is not reachable
- ignore URLs with anchors (especially the ones ill-generated
  from external objects, mainly onap-integration)
- enforce tox docs-lincheck profile

Issue-ID: DOC-692
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I619d8d5697a35bf2bdf3ee2ed59ca9f5733e7802

docs/conf.py
docs/guides/onap-user/vfw-design-tutorial/index.rst
tox.ini

index 0c79cc9..33552e8 100644 (file)
@@ -81,6 +81,18 @@ intersphinx_mapping['onap-vid'] = ('{}/onap-vid/en/%s'.format(doc_url) % branch,
 intersphinx_mapping['onap-aaf-authz'] = ('{}/onap-aaf-authz/en/%s'.format(doc_url) % branch, None)
 
 
+linkcheck_ignore = [
+   'about:config',
+   # this URL is not directly reachable and must be configured in the system hosts file.
+   'https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm',
+   # anchor issues
+   'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#.*',
+   'https://docs.linuxfoundation.org/docs/communitybridge/easycla/contributors/contribute-to-a-gerrit-project#.*',
+   'https://docs.onap.org/projects/onap-integration/en/latest/docs_robot.html#docs-robot',
+   'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#docs-usecases-release',
+   'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases.html#docs-usecases',
+   'https://docs.onap.org/projects/onap-integration/en/latest/usecases/release_non_functional_requirements.html#release-non-functional-requirements',
+]
 
 
 
index 0aa0023..171d295 100644 (file)
@@ -96,8 +96,12 @@ Let us start by creating the VLM
 
 2. Create Vendor Software Product (VSP)
 
-Prerequisite: Download VNF Heat package from gerrit (git clone "https://gerrit.onap.org/r/demo") and copy
-the required HEAT package & use it while upload the package
+Prerequisite: Download VNF Heat package from gerrit
+
+.. code: bash
+   git clone "https://gerrit.onap.org/r/demo"
+
+and copy the required HEAT package & use it while upload the package
 
  A. Go to SDC Home → ONBOARD → WORKSPACE  → CREATE NEW VSP (complete all the fields, click on Network Package
  checkbox then click create)
diff --git a/tox.ini b/tox.ini
index 3c93b29..6c8827d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,7 @@ whitelist_externals =
 [testenv:docs-linkcheck]
 basepython = python3
 deps = -r{toxinidir}/etc/requirements.txt
-commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
 
 [testenv:spellcheck]
 basepython = python3