DOC Bug Fixes 40/125040/2
authorlukegleeson <luke.gleeson@est.tech>
Fri, 15 Oct 2021 14:26:19 +0000 (15:26 +0100)
committerlukegleeson <luke.gleeson@est.tech>
Fri, 15 Oct 2021 14:26:19 +0000 (15:26 +0100)
Cherry-picked fixes:
https://gerrit.onap.org/r/c/cps/cps-temporal/+/125040
https://gerrit.onap.org/r/c/cps/cps-temporal/+/125041
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Rename /docs/requirements-docs.txt to requirements.txt

It's asked by rtd.
Issue-ID: DOC-765

Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I08256620f36f01afd202b5a4d7092983e101905e
(cherry picked from commit 508a72aef6d0ec9790480a8ba96ebf44785aaf97)

Add missing RTD static files
Clean up conf.py based on advice from docs team

Issue-ID: DOC-765

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: I48c9f6cd60cd9f7142081fff649da01d48868b57
(cherry picked from commit 6833edbf4624914419c4af24b31c2452470ec83c)
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
docs/_static/favicon.ico [new file with mode: 0644]
docs/_static/logo_onap_2017.png [new file with mode: 0644]
docs/conf.py
requirements.txt [moved from docs/requirements-docs.txt with 100% similarity]
tox.ini [moved from docs/tox.ini with 85% similarity]

diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico
new file mode 100644 (file)
index 0000000..cb712eb
Binary files /dev/null and b/docs/_static/favicon.ico differ
diff --git a/docs/_static/logo_onap_2017.png b/docs/_static/logo_onap_2017.png
new file mode 100644 (file)
index 0000000..5d064f4
Binary files /dev/null and b/docs/_static/logo_onap_2017.png differ
index 4a476ac..c2df42d 100755 (executable)
@@ -1,21 +1,23 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2021 Bell Canada
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#  ============LICENSE_START=======================================================
+#  Copyright (C) 2021 Nordix Foundation
+#  ================================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
 #
-#         http://www.apache.org/licenses/LICENSE-2.0
+#        http://www.apache.org/licenses/LICENSE-2.0
 #
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
 #
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
+#  SPDX-License-Identifier: Apache-2.0
+#  ============LICENSE_END=========================================================
 
+
+from docutils.parsers.rst import directives
 from docs_conf.conf import *
 
 branch = 'latest'
@@ -35,3 +37,62 @@ html_last_updated_fmt = '%d-%b-%y %H:%M'
 
 def setup(app):
     app.add_css_file("css/ribbon.css")
+
+needs_extra_options = {
+    "target": directives.unchanged,
+    "keyword": directives.unchanged,
+    "introduced": directives.unchanged,
+    "updated": directives.unchanged,
+    "impacts": directives.unchanged,
+    "validation_mode": directives.unchanged,
+    "validated_by": directives.unchanged,
+    "test": directives.unchanged,
+    "test_case": directives.unchanged,
+    "test_file": directives.unchanged,
+    "notes": directives.unchanged,
+}
+
+needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
+needs_id_required = True
+needs_title_optional = True
+
+needs_template_collapse = """
+.. _{{id}}:
+
+{% if hide == false -%}
+.. role:: needs_tag
+.. role:: needs_status
+.. role:: needs_type
+.. role:: needs_id
+.. role:: needs_title
+
+.. rst-class:: need
+.. rst-class:: need_{{type_name}}
+
+.. container:: need
+
+    `{{id}}` - {{content|indent(4)}}
+
+    .. container:: toggle
+
+        .. container:: header
+
+            Details
+
+{% if status and  status|upper != "NONE" and not hide_status %}        | status: :needs_status:`{{status}}`{% endif %}
+{% if tags and not hide_tags %}        | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
+{% if keyword %}        | keyword: `{{keyword}}` {% endif %}
+{% if target %}        | target: `{{target}}` {% endif %}
+{% if introduced %}        | introduced: `{{introduced}}` {% endif %}
+{% if updated %}        | updated: `{{updated}}` {% endif %}
+{% if impacts %}        | impacts: `{{impacts}}` {% endif %}
+{% if validation_mode %}        | validation mode: `{{validation_mode}}` {% endif %}
+{% if validated_by %}        | validated by: `{{validated_by}}` {% endif %}
+{% if test %}        | test: `{{test}}` {% endif %}
+{% if test_case %}        | test case: {{test_case}} {% endif %}
+{% if test_file %}        | test file: `{{test_file}}` {% endif %}
+{% if notes %}        | notes: `{{notes}}` {% endif %}
+        | children: :need_incoming:`{{id}}`
+        | parents: :need_outgoing:`{{id}}`
+{% endif -%}
+"""
similarity index 100%
rename from docs/requirements-docs.txt
rename to requirements.txt
similarity index 85%
rename from docs/tox.ini
rename to tox.ini
index 0f25a72..92aa4b2 100644 (file)
+++ b/tox.ini
@@ -23,12 +23,12 @@ skipsdist = true
 
 [testenv:docs]
 basepython = python3
-deps = -r{toxinidir}/requirements-docs.txt
+deps = -r{toxinidir}/requirements.txt
        -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
        -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
 commands =
-    sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html
-    echo "Generated docs available in {toxinidir}/_build/html"
+    sphinx-build -b html -n -d {envtmpdir}/docs/doctrees ./docs {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
 whitelist_externals =
     echo
     git
@@ -36,7 +36,7 @@ whitelist_externals =
 
 [testenv:docs-linkcheck]
 basepython = python3
-deps = -r{toxinidir}/requirements-docs.txt
+deps = -r{toxinidir}/requirements.txt
        -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
        -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
 commands = echo "Link Checking not enforced"