blob: 5185b61cd3f44d4c39fc75d21ea26c1e9b947c70 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (C) 2021 Nordix Foundation
3# ================================================================================
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
lukegleeson15b93e72021-07-07 15:25:30 +01009#
shivasubedi8df61a92021-06-16 14:43:18 +010010# 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
shivasubedi44beaa32021-09-13 15:16:30 +010019from docutils.parsers.rst import directives
Rishi.Chail5272dca2021-02-23 12:14:24 +000020
JosephKeenane68aec12022-09-01 11:39:47 +010021project = "onap"
22release = "master"
23version = "master"
24
25author = "Open Network Automation Platform"
26# yamllint disable-line rule:line-length
27copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License"
28
29pygments_style = "sphinx"
30html_theme = "sphinx_rtd_theme"
31html_theme_options = {
32 "style_nav_header_background": "white",
33 "sticky_navigation": "False" }
34html_logo = "_static/logo_onap_2017.png"
35html_favicon = "_static/favicon.ico"
36html_static_path = ["_static"]
37html_show_sphinx = False
38
39extensions = [
40 'sphinx.ext.intersphinx','sphinxcontrib.blockdiag',
41 'sphinxcontrib.seqdiag', 'sphinxcontrib.swaggerdoc', 'sphinx.ext.graphviz']
42
43#
44# Map to 'latest' if this file is used in 'latest' (master) 'doc' branch.
45# Change to {releasename} after you have created the new 'doc' branch.
46#
47
Rishi.Chail5272dca2021-02-23 12:14:24 +000048branch = 'latest'
JosephKeenane68aec12022-09-01 11:39:47 +010049
shivasubedi44beaa32021-09-13 15:16:30 +010050doc_url = 'https://docs.onap.org/projects'
Rishi.Chail5272dca2021-02-23 12:14:24 +000051master_doc = 'index'
Rishi.Chail5272dca2021-02-23 12:14:24 +000052
JosephKeenane68aec12022-09-01 11:39:47 +010053exclude_patterns = ['.tox']
54
55spelling_word_list_filename='spelling_wordlist.txt'
56spelling_lang = "en_GB"
57
Rishi.Chail5272dca2021-02-23 12:14:24 +000058intersphinx_mapping = {}
59
ToineSiebelink39207852021-10-21 12:11:25 +010060intersphinx_mapping['onap-cps-ncmp-dmi-plugin'] = ('{}/onap-cps-ncmp-dmi-plugin/en/%s'.format(doc_url) % branch, None)
61intersphinx_mapping['onap-cps-cps-temporal'] = ('{}/onap-cps-cps-temporal/en/%s'.format(doc_url) % branch, None)
shivasubedi44beaa32021-09-13 15:16:30 +010062
63linkcheck_ignore = [
64 'http://localhost',
65 'https://example.com',
JosephKeenane68aec12022-09-01 11:39:47 +010066 'about:config'
shivasubedi44beaa32021-09-13 15:16:30 +010067]
68
69
Rishi.Chail5272dca2021-02-23 12:14:24 +000070html_last_updated_fmt = '%d-%b-%y %H:%M'
71
Rishi.Chail5272dca2021-02-23 12:14:24 +000072
73def setup(app):
shivasubedi44beaa32021-09-13 15:16:30 +010074 app.add_css_file("css/ribbon.css")
75
76
77needs_extra_options = {
78 "target": directives.unchanged,
79 "keyword": directives.unchanged,
80 "introduced": directives.unchanged,
81 "updated": directives.unchanged,
82 "impacts": directives.unchanged,
83 "validation_mode": directives.unchanged,
84 "validated_by": directives.unchanged,
85 "test": directives.unchanged,
86 "test_case": directives.unchanged,
87 "test_file": directives.unchanged,
88 "notes": directives.unchanged,
89}
90
91needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
92needs_id_required = True
93needs_title_optional = True
94
95needs_template_collapse = """
96.. _{{id}}:
97
98{% if hide == false -%}
99.. role:: needs_tag
100.. role:: needs_status
101.. role:: needs_type
102.. role:: needs_id
103.. role:: needs_title
104
105.. rst-class:: need
106.. rst-class:: need_{{type_name}}
107
108.. container:: need
109
110 `{{id}}` - {{content|indent(4)}}
111
112 .. container:: toggle
113
114 .. container:: header
115
116 Details
117
118{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
119{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
120{% if keyword %} | keyword: `{{keyword}}` {% endif %}
121{% if target %} | target: `{{target}}` {% endif %}
122{% if introduced %} | introduced: `{{introduced}}` {% endif %}
123{% if updated %} | updated: `{{updated}}` {% endif %}
124{% if impacts %} | impacts: `{{impacts}}` {% endif %}
125{% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %}
126{% if validated_by %} | validated by: `{{validated_by}}` {% endif %}
127{% if test %} | test: `{{test}}` {% endif %}
128{% if test_case %} | test case: {{test_case}} {% endif %}
129{% if test_file %} | test file: `{{test_file}}` {% endif %}
130{% if notes %} | notes: `{{notes}}` {% endif %}
131 | children: :need_incoming:`{{id}}`
132 | parents: :need_outgoing:`{{id}}`
133{% endif -%}
134"""