|
| 1 | +#!/usr/bin/env python3 |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | +""" |
| 4 | +Configuration for Sphinx. |
| 5 | +""" |
| 6 | + |
| 7 | +# pylint: disable=invalid-name |
| 8 | + |
| 9 | +import os |
| 10 | +import sys |
| 11 | + |
| 12 | +import vws |
| 13 | + |
| 14 | +sys.path.insert(0, os.path.abspath('.')) |
| 15 | + |
| 16 | +extensions = [ |
| 17 | + 'sphinx.ext.autodoc', |
| 18 | + 'sphinx.ext.intersphinx', |
| 19 | + 'sphinx.ext.napoleon', |
| 20 | +] |
| 21 | + |
| 22 | +templates_path = ['_templates'] |
| 23 | +source_suffix = '.rst' |
| 24 | +master_doc = 'index' |
| 25 | + |
| 26 | +project = 'VWS Python' |
| 27 | +copyright = '2018, Adam Dangoor' # pylint: disable=redefined-builtin |
| 28 | +author = 'Adam Dangoor' |
| 29 | + |
| 30 | +# The version info for the project you're documenting, acts as replacement for |
| 31 | +# |version| and |release|, also used in various other places throughout the |
| 32 | +# built documents. |
| 33 | +version = vws.__version__ |
| 34 | +release = version.split('+')[0] |
| 35 | + |
| 36 | +language = None |
| 37 | + |
| 38 | +# The name of the syntax highlighting style to use. |
| 39 | +pygments_style = 'sphinx' |
| 40 | +html_theme = 'alabaster' |
| 41 | + |
| 42 | +# Custom sidebar templates, must be a dictionary that maps document names |
| 43 | +# to template names. |
| 44 | +# |
| 45 | +# This is required for the alabaster theme |
| 46 | +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars |
| 47 | +html_sidebars = { |
| 48 | + '**': [ |
| 49 | + 'relations.html', # needs 'show_related': True theme option to display |
| 50 | + 'searchbox.html', |
| 51 | + ], |
| 52 | +} |
| 53 | + |
| 54 | +# Output file base name for HTML help builder. |
| 55 | +htmlhelp_basename = 'VWSPYTHONdoc' |
| 56 | +autoclass_content = 'init' |
| 57 | +intersphinx_mapping = { |
| 58 | + 'python': ('https://docs.python.org/3.7', None), |
| 59 | + 'docker': ('http://docker-py.readthedocs.io/en/stable', None), |
| 60 | +} |
| 61 | +nitpicky = True |
| 62 | +warning_is_error = True |
| 63 | +nitpick_ignore = [ |
| 64 | + ('py:exc', 'RetryError'), |
| 65 | + # See https://bugs.python.org/issue31024 for why Sphinx cannot find this. |
| 66 | + ('py:class', 'typing.Tuple'), |
| 67 | + ('py:class', 'typing.Optional'), |
| 68 | + ('py:class', '_io.BytesIO'), |
| 69 | + ('py:class', 'docker.types.services.Mount'), |
| 70 | +] |
| 71 | + |
| 72 | +html_show_copyright = False |
| 73 | +html_show_sphinx = False |
| 74 | +html_show_sourcelink = False |
| 75 | + |
| 76 | +html_theme_options = { |
| 77 | + 'show_powered_by': 'false', |
| 78 | +} |
| 79 | + |
| 80 | +html_sidebars = { |
| 81 | + '**': [ |
| 82 | + 'about.html', |
| 83 | + 'navigation.html', |
| 84 | + 'searchbox.html', |
| 85 | + ], |
| 86 | +} |
| 87 | + |
| 88 | +# Don't check anchors because many websites use #! for AJAX magic |
| 89 | +# http://sphinx-doc.org/config.html#confval-linkcheck_anchors |
| 90 | +linkcheck_anchors = False |
| 91 | +# Retry link checking to avoid transient network errors. |
| 92 | +linkcheck_retries = 5 |
| 93 | +linkcheck_ignore = [ |
| 94 | + # Requires login. |
| 95 | + r'https://developer.vuforia.com/targetmanager', |
| 96 | +] |
| 97 | + |
| 98 | +spelling_word_list_filename = '../../spelling_private_dict.txt' |
| 99 | + |
| 100 | +autodoc_member_order = 'bysource' |
0 commit comments