aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukegleeson <luke.gleeson@est.tech>2021-10-15 15:26:19 +0100
committerlukegleeson <luke.gleeson@est.tech>2021-10-15 15:26:19 +0100
commit0602329589d081ea0cc46fe91186ba29f2d38274 (patch)
tree7799723ec35bf60bd03229b433a5c10497954404
parent3ab5f02443279f543947b90e44e7d48193033524 (diff)
DOC Bug Fixes
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>
-rw-r--r--docs/_static/favicon.icobin0 -> 2102 bytes
-rw-r--r--docs/_static/logo_onap_2017.pngbin0 -> 12278 bytes
-rwxr-xr-xdocs/conf.py89
-rw-r--r--requirements.txt (renamed from docs/requirements-docs.txt)0
-rw-r--r--tox.ini (renamed from docs/tox.ini)8
5 files changed, 79 insertions, 18 deletions
diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico
new file mode 100644
index 0000000..cb712eb
--- /dev/null
+++ b/docs/_static/favicon.ico
Binary files differ
diff --git a/docs/_static/logo_onap_2017.png b/docs/_static/logo_onap_2017.png
new file mode 100644
index 0000000..5d064f4
--- /dev/null
+++ b/docs/_static/logo_onap_2017.png
Binary files differ
diff --git a/docs/conf.py b/docs/conf.py
index 4a476ac..c2df42d 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -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 -%}
+"""
diff --git a/docs/requirements-docs.txt b/requirements.txt
index 5a3d2f1..5a3d2f1 100644
--- a/docs/requirements-docs.txt
+++ b/requirements.txt
diff --git a/docs/tox.ini b/tox.ini
index 0f25a72..92aa4b2 100644
--- a/docs/tox.ini
+++ 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"