Aric Gardner | 0fb94b1 | 2020-01-28 15:21:34 -0500 | [diff] [blame] | 1 | from docs_conf.conf import * |
Rich Bennett | 22ef085 | 2017-07-19 18:05:55 -0400 | [diff] [blame] | 2 | |
Aric Gardner | 0fb94b1 | 2020-01-28 15:21:34 -0500 | [diff] [blame] | 3 | branch = 'latest' |
Rich Bennett | 22ef085 | 2017-07-19 18:05:55 -0400 | [diff] [blame] | 4 | master_doc = 'index' |
| 5 | |
Aric Gardner | 0fb94b1 | 2020-01-28 15:21:34 -0500 | [diff] [blame] | 6 | linkcheck_ignore = [ |
| 7 | 'http://localhost', |
| 8 | ] |
Rich Bennett | c599566 | 2017-10-18 15:27:52 -0400 | [diff] [blame] | 9 | |
Aric Gardner | 0fb94b1 | 2020-01-28 15:21:34 -0500 | [diff] [blame] | 10 | intersphinx_mapping = {} |
Rich Bennett | c599566 | 2017-10-18 15:27:52 -0400 | [diff] [blame] | 11 | |
Rich Bennett | 80455a5 | 2017-11-08 05:17:00 -0500 | [diff] [blame] | 12 | html_last_updated_fmt = '%d-%b-%y %H:%M' |
Rich Bennett | 22ef085 | 2017-07-19 18:05:55 -0400 | [diff] [blame] | 13 | |
Rich Bennett | 317d81a | 2018-09-11 07:38:05 -0400 | [diff] [blame] | 14 | def setup(app): |
Aric Gardner | 0fb94b1 | 2020-01-28 15:21:34 -0500 | [diff] [blame] | 15 | app.add_stylesheet("css/ribbon_onap.css") |
Aric Gardner | e241721 | 2020-02-07 13:56:45 -0500 | [diff] [blame] | 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 | |