From 0602329589d081ea0cc46fe91186ba29f2d38274 Mon Sep 17 00:00:00 2001 From: lukegleeson Date: Fri, 15 Oct 2021 15:26:19 +0100 Subject: DOC Bug Fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Rename /docs/requirements-docs.txt to requirements.txt It's asked by rtd. Issue-ID: DOC-765 Signed-off-by: Cédric Ollivier 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 Change-Id: I48c9f6cd60cd9f7142081fff649da01d48868b57 (cherry picked from commit 6833edbf4624914419c4af24b31c2452470ec83c) Signed-off-by: lukegleeson --- docs/_static/favicon.ico | Bin 0 -> 2102 bytes docs/_static/logo_onap_2017.png | Bin 0 -> 12278 bytes docs/conf.py | 89 +++++++++++++++++++++++++++++++++------- docs/requirements-docs.txt | 1 - docs/tox.ini | 44 -------------------- requirements.txt | 1 + tox.ini | 44 ++++++++++++++++++++ 7 files changed, 120 insertions(+), 59 deletions(-) create mode 100644 docs/_static/favicon.ico create mode 100644 docs/_static/logo_onap_2017.png delete mode 100644 docs/requirements-docs.txt delete mode 100644 docs/tox.ini create mode 100644 requirements.txt create mode 100644 tox.ini diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 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 index 0000000..5d064f4 Binary files /dev/null and b/docs/_static/logo_onap_2017.png 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/docs/requirements-docs.txt deleted file mode 100644 index 5a3d2f1..0000000 --- a/docs/requirements-docs.txt +++ /dev/null @@ -1 +0,0 @@ -lfdocs-conf \ No newline at end of file diff --git a/docs/tox.ini b/docs/tox.ini deleted file mode 100644 index 0f25a72..0000000 --- a/docs/tox.ini +++ /dev/null @@ -1,44 +0,0 @@ -# ============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 -# -# 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. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -[tox] -minversion = 1.6 -envlist = docs -skipsdist = true - -[testenv:docs] -basepython = python3 -deps = -r{toxinidir}/requirements-docs.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" -whitelist_externals = - echo - git - sh - -[testenv:docs-linkcheck] -basepython = python3 -deps = -r{toxinidir}/requirements-docs.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" -whitelist_externals = - echo diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5a3d2f1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +lfdocs-conf \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..92aa4b2 --- /dev/null +++ b/tox.ini @@ -0,0 +1,44 @@ +# ============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 +# +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +[tox] +minversion = 1.6 +envlist = docs +skipsdist = true + +[testenv:docs] +basepython = python3 +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}/docs/doctrees ./docs {toxinidir}/docs/_build/html + echo "Generated docs available in {toxinidir}/docs/_build/html" +whitelist_externals = + echo + git + sh + +[testenv:docs-linkcheck] +basepython = python3 +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" +whitelist_externals = + echo -- cgit 1.2.3-korg