cps-core deployment document
[cps.git] / docs / conf.py
1 #  ============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
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
21 from docs_conf.conf import *
22
23 branch = 'latest'
24 doc_url = 'https://docs.onap.org/projects'
25 master_doc = 'index'
26
27 intersphinx_mapping = {}
28
29 # Latest (change to branch)
30 intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
31
32 linkcheck_ignore = [
33     'http://localhost',
34     'https://example.com',
35     'about:config',
36     # this URL is not directly reachable and must be configured in the system hosts file.
37     'https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm',
38     # anchor issues
39     'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#.*',
40     'https://docs.linuxfoundation.org/docs/communitybridge/easycla/contributors/contribute-to-a-gerrit-project#.*',
41     'https://docs.onap.org/projects/onap-integration/en/latest/docs_robot.html#docs-robot',
42     'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#docs-usecases-release',
43     'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases.html#docs-usecases',
44     'https://docs.onap.org/projects/onap-integration/en/latest/usecases/release_non_functional_requirements.html#release-non-functional-requirements',
45 ]
46
47
48 html_last_updated_fmt = '%d-%b-%y %H:%M'
49
50
51 def setup(app):
52     app.add_css_file("css/ribbon.css")
53
54
55 needs_extra_options = {
56     "target": directives.unchanged,
57     "keyword": directives.unchanged,
58     "introduced": directives.unchanged,
59     "updated": directives.unchanged,
60     "impacts": directives.unchanged,
61     "validation_mode": directives.unchanged,
62     "validated_by": directives.unchanged,
63     "test": directives.unchanged,
64     "test_case": directives.unchanged,
65     "test_file": directives.unchanged,
66     "notes": directives.unchanged,
67 }
68
69 needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
70 needs_id_required = True
71 needs_title_optional = True
72
73 needs_template_collapse = """
74 .. _{{id}}:
75
76 {% if hide == false -%}
77 .. role:: needs_tag
78 .. role:: needs_status
79 .. role:: needs_type
80 .. role:: needs_id
81 .. role:: needs_title
82
83 .. rst-class:: need
84 .. rst-class:: need_{{type_name}}
85
86 .. container:: need
87
88     `{{id}}` - {{content|indent(4)}}
89
90     .. container:: toggle
91
92         .. container:: header
93
94             Details
95
96 {% if status and  status|upper != "NONE" and not hide_status %}        | status: :needs_status:`{{status}}`{% endif %}
97 {% if tags and not hide_tags %}        | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
98 {% if keyword %}        | keyword: `{{keyword}}` {% endif %}
99 {% if target %}        | target: `{{target}}` {% endif %}
100 {% if introduced %}        | introduced: `{{introduced}}` {% endif %}
101 {% if updated %}        | updated: `{{updated}}` {% endif %}
102 {% if impacts %}        | impacts: `{{impacts}}` {% endif %}
103 {% if validation_mode %}        | validation mode: `{{validation_mode}}` {% endif %}
104 {% if validated_by %}        | validated by: `{{validated_by}}` {% endif %}
105 {% if test %}        | test: `{{test}}` {% endif %}
106 {% if test_case %}        | test case: {{test_case}} {% endif %}
107 {% if test_file %}        | test file: `{{test_file}}` {% endif %}
108 {% if notes %}        | notes: `{{notes}}` {% endif %}
109         | children: :need_incoming:`{{id}}`
110         | parents: :need_outgoing:`{{id}}`
111 {% endif -%}
112 """