X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=docs%2Fconf.py;h=83601da1892f0f43927ca7c19e6baa2df029cb14;hb=22c09f16d54c6620c55801e396ff89a135cb46d7;hp=54db529a213c0c9cb87fc83b2d902e3d87bd52ca;hpb=ec89e2605bbf7f530cb632482500c49359831343;p=doc.git diff --git a/docs/conf.py b/docs/conf.py index 54db529a2..83601da18 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,8 @@ extensions = [ 'sphinx.ext.imgmath', 'sphinx.ext.viewcode', 'sphinxcontrib.blockdiag', + 'sphinxcontrib.needs', + 'sphinxcontrib.nwdiag', 'sphinxcontrib.seqdiag', 'sphinx.ext.ifconfig', 'sphinx.ext.todo', @@ -46,7 +48,8 @@ extensions = [ ] # Font path for seqdiag -seqdiag_fontpath= '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf' +seqdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf' +nwdiag_fontpath = '/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed.ttf' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -64,7 +67,7 @@ master_doc = 'index' # General information about the project. project = u'' -copyright = u'2017 ONAP. Licensed under Creative Commons Attribution 4.0 International License' +copyright = u'2018 ONAP. Licensed under Creative Commons Attribution 4.0 International License' author = u'Open Network Automation Platform' @@ -72,11 +75,10 @@ author = u'Open Network Automation Platform' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -# # The short X.Y version. -version = 'Latest' +version = 'master branch' # The full version, including alpha/beta/rc tags. -release = 'Latest' +release = 'master branch' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -94,8 +96,6 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [ - 'submodules/aai/aai-common.git/docs/platform/offeredapis.rst', - 'submodules/so.git/aria/multivim-plugin/', '_build' ] @@ -131,13 +131,13 @@ todo_include_todos = True # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'bootstrap' -html_theme = 'classic' +#html_theme = 'classic' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = {'style_nav_header_background': 'white'} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() @@ -378,5 +378,116 @@ epub_exclude_files = ['search.html'] #epub_use_index = True # Patterns to ignore in linkcheck builder -linkcheck_ignore = [r'http://localhost:\d+/'] +linkcheck_ignore = [ + r'http://$', + r'http:/$', + r'http://10\.', + r'http://127\.', + r'http://172\.[123]', + r'http://app_host:port/', + r'http://app-host:port/', + r'http://ESR_SERVICE_IP', + r'http://ESR_SERVER_IP', + r'http://hostIP:\d+/', + r'http://load-balanced-address:\d+/', + r'http://localhost', + r'http://\$msb_address/', + r'http://\$MSB_SERVER_IP:\d+/', + r'http://msb_docker_host_ip:\d+/', + r'http://MSB_IP:MSB_PORT/', + r'http://msb.onap.org', + r'http://MSB_SERVER_IP:\d+/', + r'http://org.openecomp.', + r'http://{PDP_URL}:\d+/', + r'http://servername.domain.com', + r'http://.*simpledemo.openecomp.org', + r'http://.*simpledemo.onap.org', + r'http://.*test.att.com:\d+/', + r'http://we-are-data-router.us', + r'http://we-are-message-router.us:\d+/' + r'http://www.\[host\]:\[port\]/', + r'http://yourhostname', + r'https://$', + r'https:/$', + r'https://10\.', + r'https://127\.', + r'https://172\.[123]', + r'https://aaf.onap.org', + r'https://\$CBAM_IP', + r'https://ESR_SERVICE_IP', + r'https://ESR_SERVER_IP', + r'https://msb.onap.org', + r'https://my-subscriber-app.dcae', + r'https://\$CBAM_IP:\d+/', + r'https://load-balanced-address:\d+/', + r'https://prov.datarouternew.com:8443', + r'https://.*simpledemo.openecomp.org', + r'https://.*simpledemo.onap.org', + r'https://.*test.att.com:\d+/', + r'https://we-are-data-router.us', + r'https://we-are-message-router.us:\d+/' + ] + +from docutils.parsers.rst import directives + +needs_extra_options = { + "target": directives.unchanged, + "keyword": directives.unchanged, + "introduced": directives.unchanged, + "updated": directives.unchanged, + "impacts": directives.unchanged, + "validation_mode": directives.unchanged, + "validated_by": directives.unchanged, + "test": directives.unchanged, + "test_case": directives.unchanged, + "test_file": directives.unchanged, + "notes": directives.unchanged, +} +needs_id_regex = "^[A-Z0-9]+-[A-Z0-9]+" +needs_id_required = True +needs_title_optional = True + +needs_template_collapse = """ +.. _{{id}}: + +{% if hide == false -%} +.. role:: needs_tag +.. role:: needs_status +.. role:: needs_type +.. role:: needs_id +.. role:: needs_title + +.. rst-class:: need +.. rst-class:: need_{{type_name}} + +.. container:: need + + `{{id}}` - {{content|indent(4)}} + + .. container:: toggle + + .. container:: header + + Details + +{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %} +{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %} +{% if keyword %} | keyword: `{{keyword}}` {% endif %} +{% if target %} | target: `{{target}}` {% endif %} +{% if introduced %} | introduced: `{{introduced}}` {% endif %} +{% if updated %} | updated: `{{updated}}` {% endif %} +{% if impacts %} | impacts: `{{impacts}}` {% endif %} +{% if validation_mode %} | validation mode: `{{validation_mode}}` {% endif %} +{% if validated_by %} | validated by: `{{validated_by}}` {% endif %} +{% if test %} | test: `{{test}}` {% endif %} +{% if test_case %} | test case: {{test_case}} {% endif %} +{% if test_file %} | test file: `{{test_file}}` {% endif %} +{% if notes %} | notes: `{{notes}}` {% endif %} + | children: :need_incoming:`{{id}}` + | parents: :need_outgoing:`{{id}}` +{% endif -%} +""" + +def setup(app): + app.add_stylesheet("css/ribbon.css")