Update git submodules
[doc.git] / docs / conf.py
1 from docs_conf.conf import *
2
3 branch = 'latest'
4 master_doc = 'index'
5
6 linkcheck_ignore = [
7     'http://localhost',
8 ]
9
10 intersphinx_mapping = {}
11
12 html_last_updated_fmt = '%d-%b-%y %H:%M'
13
14 def setup(app):
15     app.add_stylesheet("css/ribbon_onap.css")
16
17
18 from docutils.parsers.rst import directives
19
20 needs_extra_options = {
21     "target": directives.unchanged,
22     "keyword": directives.unchanged,
23     "introduced": directives.unchanged,
24     "updated": directives.unchanged,
25     "impacts": directives.unchanged,
26     "validation_mode": directives.unchanged,
27     "validated_by": directives.unchanged,
28     "test": directives.unchanged,
29     "test_case": directives.unchanged,
30     "test_file": directives.unchanged,
31     "notes": directives.unchanged,
32 }
33
34 needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+"
35 needs_id_required = True
36 needs_title_optional = True
37
38 needs_template_collapse = """
39 .. _{{id}}:
40
41 {% if hide == false -%}
42 .. role:: needs_tag
43 .. role:: needs_status
44 .. role:: needs_type
45 .. role:: needs_id
46 .. role:: needs_title
47
48 .. rst-class:: need
49 .. rst-class:: need_{{type_name}}
50
51 .. container:: need
52
53     `{{id}}` - {{content|indent(4)}}
54
55     .. container:: toggle
56
57         .. container:: header
58
59             Details
60
61 {% if status and  status|upper != "NONE" and not hide_status %}        | status: :needs_status:`{{status}}`{% endif %}
62 {% if tags and not hide_tags %}        | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
63 {% if keyword %}        | keyword: `{{keyword}}` {% endif %}
64 {% if target %}        | target: `{{target}}` {% endif %}
65 {% if introduced %}        | introduced: `{{introduced}}` {% endif %}
66 {% if updated %}        | updated: `{{updated}}` {% endif %}
67 {% if impacts %}        | impacts: `{{impacts}}` {% endif %}
68 {% if validation_mode %}        | validation mode: `{{validation_mode}}` {% endif %}
69 {% if validated_by %}        | validated by: `{{validated_by}}` {% endif %}
70 {% if test %}        | test: `{{test}}` {% endif %}
71 {% if test_case %}        | test case: {{test_case}} {% endif %}
72 {% if test_file %}        | test file: `{{test_file}}` {% endif %}
73 {% if notes %}        | notes: `{{notes}}` {% endif %}
74         | children: :need_incoming:`{{id}}`
75         | parents: :need_outgoing:`{{id}}`
76 {% endif -%}
77 """
78