aboutsummaryrefslogtreecommitdiffstats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorshivasubedi <shiva.subedi@est.tech>2021-09-13 15:16:30 +0100
committershivasubedi <shiva.subedi@est.tech>2021-09-14 13:03:05 +0100
commit44beaa34486d0624175c42cc3899a0b53befd9a8 (patch)
tree61ef0035332bd907aab19d8b54658d6c345c9af3 /docs/conf.py
parent88cadd3f3aaa22cccb0d2159cf57fb2b84d440a2 (diff)
Create Preliminary Documentation for CPS-Core & NCMP
Create Preliminary documentation for Istanbul release of the CPS-Core. Added new plugins in POM to generate swagger doc for design page. Added latest conf.py file from http://gerrit.onap.org/r/doc Followed template from work done by Chaker here https://wiki.onap.org/display/DW/Component+Documentation+Template Issue-ID: CPS-633 Change-Id: I431776e4d052ec65bf1e1d7709d12d0100592cd5 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Signed-off-by: shivasubedi <shiva.subedi@est.tech>
Diffstat (limited to 'docs/conf.py')
-rwxr-xr-xdocs/conf.py87
1 files changed, 80 insertions, 7 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 1a9a5475a..3aaddd194 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,24 +16,97 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
+
+from docutils.parsers.rst import directives
from docs_conf.conf import *
branch = 'latest'
+doc_url = 'https://docs.onap.org/projects'
master_doc = 'index'
-extensions = [
- 'sphinx.ext.autosectionlabel',
- 'sphinxcontrib.swaggerdoc'
- ]
+
+intersphinx_mapping = {}
+
+# Latest (change to branch)
+intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
linkcheck_ignore = [
'http://localhost',
+ 'https://example.com',
+ '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',
]
-intersphinx_mapping = {}
html_last_updated_fmt = '%d-%b-%y %H:%M'
-autosectionlabel_maxdepth = 2
def setup(app):
- app.add_stylesheet("css/ribbon.css")
+ 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 -%}
+"""