blob: acf3927e089f60d0b593fe7aea19e64fbe0ba4ab [file] [log] [blame]
shivasubedi3d1579c2021-09-13 16:43:20 +01001# ============LICENSE_START=======================================================
seanbeirnea67e7352022-10-25 17:36:55 +01002# Copyright (C) 2022 Nordix Foundation
shivasubedi3d1579c2021-09-13 16:43:20 +01003# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# SPDX-License-Identifier: Apache-2.0
17# ============LICENSE_END=========================================================
18
19
20from docutils.parsers.rst import directives
shivasubedi3d1579c2021-09-13 16:43:20 +010021
seanbeirnea67e7352022-10-25 17:36:55 +010022project = "onap"
23release = "master"
24version = "master"
25
26author = "Open Network Automation Platform"
27# yamllint disable-line rule:line-length
28copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License"
29
30pygments_style = "sphinx"
31html_theme = "sphinx_rtd_theme"
32html_theme_options = {
33 "style_nav_header_background": "white",
34 "sticky_navigation": "False" }
35html_logo = "_static/logo_onap_2017.png"
36html_favicon = "_static/favicon.ico"
37html_static_path = ["_static"]
38html_show_sphinx = False
39
40extensions = [
41 'sphinx.ext.intersphinx','sphinxcontrib.blockdiag',
42 'sphinxcontrib.seqdiag', 'sphinxcontrib.swaggerdoc', 'sphinx.ext.graphviz']
43
44#
45# Map to 'latest' if this file is used in 'latest' (master) 'doc' branch.
46# Change to {releasename} after you have created the new 'doc' branch.
47#
48
shivasubedi3d1579c2021-09-13 16:43:20 +010049branch = 'latest'
seanbeirnea67e7352022-10-25 17:36:55 +010050
shivasubedi3d1579c2021-09-13 16:43:20 +010051doc_url = 'https://docs.onap.org/projects'
52master_doc = 'index'
53
seanbeirnea67e7352022-10-25 17:36:55 +010054exclude_patterns = ['.tox']
55
56spelling_word_list_filename='spelling_wordlist.txt'
57spelling_lang = "en_GB"
58
shivasubedi3d1579c2021-09-13 16:43:20 +010059intersphinx_mapping = {}
60
shivasubedi3d1579c2021-09-13 16:43:20 +010061intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
ToineSiebelinkb84eea22021-10-21 13:37:33 +010062intersphinx_mapping['onap-cps-cps-temporal'] = ('{}/onap-cps-cps-temporal/en/%s'.format(doc_url) % branch, None)
shivasubedi3d1579c2021-09-13 16:43:20 +010063
64linkcheck_ignore = [
65 'http://localhost',
66 'https://example.com',
seanbeirnea67e7352022-10-25 17:36:55 +010067 'about:config'
shivasubedi3d1579c2021-09-13 16:43:20 +010068]
69
70
71html_last_updated_fmt = '%d-%b-%y %H:%M'
72
73
74def setup(app):
75 app.add_css_file("css/ribbon.css")
76
77
78needs_extra_options = {
79 "target": directives.unchanged,
80 "keyword": directives.unchanged,
81 "introduced": directives.unchanged,
82 "updated": directives.unchanged,
83 "impacts": directives.unchanged,
84 "validation_mode": directives.unchanged,
85 "validated_by": directives.unchanged,
86 "test": directives.unchanged,
87 "test_case": directives.unchanged,
88 "test_file": directives.unchanged,
89 "notes": directives.unchanged,
90}
91
92needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
93needs_id_required = True
94needs_title_optional = True
95
96needs_template_collapse = """
97.. _{{id}}:
98
99{% if hide == false -%}
100.. role:: needs_tag
101.. role:: needs_status
102.. role:: needs_type
103.. role:: needs_id
104.. role:: needs_title
105
106.. rst-class:: need
107.. rst-class:: need_{{type_name}}
108
109.. container:: need
110
111 `{{id}}` - {{content|indent(4)}}
112
113 .. container:: toggle
114
115 .. container:: header
116
117 Details
118
119{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
120{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
121{% if keyword %} | keyword: `{{keyword}}` {% endif %}
122{% if target %} | target: `{{target}}` {% endif %}
123{% if introduced %} | introduced: `{{introduced}}` {% endif %}
124{% if updated %} | updated: `{{updated}}` {% endif %}
125{% if impacts %} | impacts: `{{impacts}}` {% endif %}
126{% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %}
127{% if validated_by %} | validated by: `{{validated_by}}` {% endif %}
128{% if test %} | test: `{{test}}` {% endif %}
129{% if test_case %} | test case: {{test_case}} {% endif %}
130{% if test_file %} | test file: `{{test_file}}` {% endif %}
131{% if notes %} | notes: `{{notes}}` {% endif %}
132 | children: :need_incoming:`{{id}}`
133 | parents: :need_outgoing:`{{id}}`
134{% endif -%}
135"""