shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 2 | # Copyright (C) 2022 Nordix Foundation |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 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 |
| 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 | |
| 20 | from docutils.parsers.rst import directives |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 21 | |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 22 | project = "onap" |
| 23 | release = "master" |
| 24 | version = "master" |
| 25 | |
| 26 | author = "Open Network Automation Platform" |
| 27 | # yamllint disable-line rule:line-length |
| 28 | copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License" |
| 29 | |
| 30 | pygments_style = "sphinx" |
| 31 | html_theme = "sphinx_rtd_theme" |
| 32 | html_theme_options = { |
| 33 | "style_nav_header_background": "white", |
| 34 | "sticky_navigation": "False" } |
thmsdt | 372b29c | 2024-08-14 10:22:19 +0200 | [diff] [blame] | 35 | html_logo = "_static/logo_onap_2024.png" |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 36 | html_favicon = "_static/favicon.ico" |
| 37 | html_static_path = ["_static"] |
| 38 | html_show_sphinx = False |
| 39 | |
| 40 | extensions = [ |
| 41 | 'sphinx.ext.intersphinx','sphinxcontrib.blockdiag', |
halil.cakal | 73a5134 | 2023-03-20 10:33:08 +0000 | [diff] [blame] | 42 | 'sphinxcontrib.seqdiag', 'sphinxcontrib.swaggerdoc', 'sphinx.ext.graphviz', |
| 43 | 'sphinxcontrib.spelling'] |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 44 | |
| 45 | # |
| 46 | # Map to 'latest' if this file is used in 'latest' (master) 'doc' branch. |
| 47 | # Change to {releasename} after you have created the new 'doc' branch. |
| 48 | # |
| 49 | |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 50 | branch = 'latest' |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 51 | |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 52 | doc_url = 'https://docs.onap.org/projects' |
| 53 | master_doc = 'index' |
| 54 | |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 55 | exclude_patterns = ['.tox'] |
| 56 | |
| 57 | spelling_word_list_filename='spelling_wordlist.txt' |
| 58 | spelling_lang = "en_GB" |
| 59 | |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 60 | intersphinx_mapping = {} |
| 61 | |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 62 | intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None) |
ToineSiebelink | b84eea2 | 2021-10-21 13:37:33 +0100 | [diff] [blame] | 63 | intersphinx_mapping['onap-cps-cps-temporal'] = ('{}/onap-cps-cps-temporal/en/%s'.format(doc_url) % branch, None) |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 64 | |
| 65 | linkcheck_ignore = [ |
| 66 | 'http://localhost', |
| 67 | 'https://example.com', |
seanbeirne | a67e735 | 2022-10-25 17:36:55 +0100 | [diff] [blame] | 68 | 'about:config' |
shivasubedi | 3d1579c | 2021-09-13 16:43:20 +0100 | [diff] [blame] | 69 | ] |
| 70 | |
| 71 | |
| 72 | html_last_updated_fmt = '%d-%b-%y %H:%M' |
| 73 | |
| 74 | |
| 75 | def setup(app): |
| 76 | app.add_css_file("css/ribbon.css") |
| 77 | |
| 78 | |
| 79 | needs_extra_options = { |
| 80 | "target": directives.unchanged, |
| 81 | "keyword": directives.unchanged, |
| 82 | "introduced": directives.unchanged, |
| 83 | "updated": directives.unchanged, |
| 84 | "impacts": directives.unchanged, |
| 85 | "validation_mode": directives.unchanged, |
| 86 | "validated_by": directives.unchanged, |
| 87 | "test": directives.unchanged, |
| 88 | "test_case": directives.unchanged, |
| 89 | "test_file": directives.unchanged, |
| 90 | "notes": directives.unchanged, |
| 91 | } |
| 92 | |
| 93 | needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+" |
| 94 | needs_id_required = True |
| 95 | needs_title_optional = True |
| 96 | |
| 97 | needs_template_collapse = """ |
| 98 | .. _{{id}}: |
| 99 | |
| 100 | {% if hide == false -%} |
| 101 | .. role:: needs_tag |
| 102 | .. role:: needs_status |
| 103 | .. role:: needs_type |
| 104 | .. role:: needs_id |
| 105 | .. role:: needs_title |
| 106 | |
| 107 | .. rst-class:: need |
| 108 | .. rst-class:: need_{{type_name}} |
| 109 | |
| 110 | .. container:: need |
| 111 | |
| 112 | `{{id}}` - {{content|indent(4)}} |
| 113 | |
| 114 | .. container:: toggle |
| 115 | |
| 116 | .. container:: header |
| 117 | |
| 118 | Details |
| 119 | |
| 120 | {% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %} |
| 121 | {% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %} |
| 122 | {% if keyword %} | keyword: `{{keyword}}` {% endif %} |
| 123 | {% if target %} | target: `{{target}}` {% endif %} |
| 124 | {% if introduced %} | introduced: `{{introduced}}` {% endif %} |
| 125 | {% if updated %} | updated: `{{updated}}` {% endif %} |
| 126 | {% if impacts %} | impacts: `{{impacts}}` {% endif %} |
| 127 | {% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %} |
| 128 | {% if validated_by %} | validated by: `{{validated_by}}` {% endif %} |
| 129 | {% if test %} | test: `{{test}}` {% endif %} |
| 130 | {% if test_case %} | test case: {{test_case}} {% endif %} |
| 131 | {% if test_file %} | test file: `{{test_file}}` {% endif %} |
| 132 | {% if notes %} | notes: `{{notes}}` {% endif %} |
| 133 | | children: :need_incoming:`{{id}}` |
| 134 | | parents: :need_outgoing:`{{id}}` |
| 135 | {% endif -%} |
| 136 | """ |