<filename>docs/conf.py
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file. See <http://www.sphinx-doc.org/en/stable/config.html>
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sphinx_rtd_theme

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import sys, os.path
sys.path.insert(0, os.path.abspath('..'))

from aiopluggy import VERSION

# -- General configuration ------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autosectionlabel',
    'sphinx.ext.autodoc',
    'sphinx.ext.coverage',
    'sphinx.ext.doctest',
    'sphinx.ext.intersphinx',
    'sphinx.ext.napoleon',
    'sphinx_autodoc_typehints',
    'sphinx.ext.todo',
    'sphinx.ext.viewcode',
]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

master_doc = 'index'

# General information about the project.
project = 'aiopluggy'
# noinspection PyShadowingBuiltins
copyright = '2016, <NAME>'
author = '<NAME>'

# 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 = u'.'.join(VERSION.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = VERSION

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

add_module_names = False

default_role = 'py:obj'

# nitpicky = False

# This value contains a list of modules to be mocked up. This is useful when
# some external dependencies are not met at build time and break the building
# process. You may only specify the root package of the dependencies themselves
# and ommit the sub-modules:
autodoc_mock_imports = ['aiohttp.web_exceptions']


# -- Options for extensions -----------------------------------------------

autosectionlabel_prefix_document = True

# intersphinx_mapping = {
#     'pytest': ('https://docs.pytest.org/en/latest/', 'pytest.inv'),
#     'python': ('https://docs.python.org/3.6/', 'python.inv')
# }
#
# import urllib.request
#
# # The following code downloads *.inv files from the intersphinx docsets, and
# # extracts these *.inv files to *.inv.txt files.
# for inventory in intersphinx_mapping:
#     if not os.path.exists(intersphinx_mapping[inventory][1]):
#         urllib.request.urlretrieve(
#             intersphinx_mapping[inventory][0] + 'objects.inv',
#             filename=intersphinx_mapping[inventory][1]
#         )
#         os.system(
#             """
#                 {{
#                     printf "\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00";
#                     tail -n +5 '{0}';
#                 }} | gunzip --quiet >'{0}.txt'
#             """.format(intersphinx_mapping[inventory][1])
#         )

intersphinx_mapping = {
    'https://docs.python.org/3.6/': None,
    'pytest': ('https://docs.pytest.org/en/latest/', None)
}

autodoc_default_flags = [
    'members',
    'private-members',
    #'special-members',
    #'undoc-members',
    'show-inheritance'
]

# Extract both the class docstring and the docstring in __init__ or __new__.
# By default, autoclass only extracts the class-level docstring.
# We used to set this to 'both', but the napoleon extension makes this
# unnecessary.  See also the `napoleon_include_init_with_doc` parameter.
#autoclass_content = 'both'

# Napoleon settings:

#napoleon_google_docstring = True
napoleon_numpy_docstring = False
# True to list __init___ docstrings separately from the class docstring.  False
# to fall back to Sphinx’s default behavior, which considers the __init___
# docstring as part of the class documentation.  Defaults to False.
napoleon_include_init_with_doc = True
#napoleon_include_private_with_doc = False
#napoleon_include_special_with_doc = True
#napoleon_use_admonition_for_examples = False
#napoleon_use_admonition_for_notes = False
#napoleon_use_admonition_for_references = False
#napoleon_use_ivar = False
#napoleon_use_param = True
#napoleon_use_keyword = True
#napoleon_use_rtype = True


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
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.

# Sphinx RTD theme:
html_theme_options = {
    #'typekit_id': 'hiw1hhg',
    #'analytics_id': None,
    #'sticky_navigation': False,
    #'logo_only': None,
    #'collapse_navigation': True,
    'collapse_navigation': False,
    #'display_version': True,
    'display_version': False,
    #'navigation_depth': 4,
    #'prev_next_buttons_location': 'bottom',
    'canonical_url': 'https://amsterdam.github.io/aiohttp_openapi_haljson/',
}

# html_theme = 'alabaster'
# html_theme_options = {
#     # 'logo': 'img/plug.png',
#     # 'logo_name': 'true',
#     'description': 'The asyncio plugin system',
#     'github_user': 'pieterb',
#     'github_repo': 'aiopluggy',
#     'github_button': 'true',
#     'github_banner': 'true',
#     'page_width': '1080px',
#     'fixed_sidebar': 'false',
# }

html_static_path = ['_static']

# Optional, for readthedocs.org.
# See also: <http://docs.readthedocs.io/en/latest/vcs.html>
html_context = {
    "display_github": True, # Integrate GitHub
    "github_user": "Amsterdam", # Username
    "github_repo": "aiopluggy", # Repo name
    "github_version": "master", # Version
    "conf_py_path": "/docs/", # Path in the checkout to the docs root
}

<filename>docs/conf.py
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file. See <http://www.sphinx-doc.org/en/stable/config.html>
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sphinx_rtd_theme

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import sys, os.path
sys.path.insert(0, os.path.abspath('..'))

from aiopluggy import VERSION

# -- General configuration ------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autosectionlabel',
    'sphinx.ext.autodoc',
    'sphinx.ext.coverage',
    'sphinx.ext.doctest',
    'sphinx.ext.intersphinx',
    'sphinx.ext.napoleon',
    'sphinx_autodoc_typehints',
    'sphinx.ext.todo',
    'sphinx.ext.viewcode',
]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

master_doc = 'index'

# General information about the project.
project = 'aiopluggy'
# noinspection PyShadowingBuiltins
copyright = '2016, <NAME>'
author = '<NAME>'

# 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 = u'.'.join(VERSION.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = VERSION

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

add_module_names = False

default_role = 'py:obj'

# nitpicky = False

# This value contains a list of modules to be mocked up. This is useful when
# some external dependencies are not met at build time and break the building
# process. You may only specify the root package of the dependencies themselves
# and ommit the sub-modules:
autodoc_mock_imports = ['aiohttp.web_exceptions']


# -- Options for extensions -----------------------------------------------

autosectionlabel_prefix_document = True

# intersphinx_mapping = {
#     'pytest': ('https://docs.pytest.org/en/latest/', 'pytest.inv'),
#     'python': ('https://docs.python.org/3.6/', 'python.inv')
# }
#
# import urllib.request
#
# # The following code downloads *.inv files from the intersphinx docsets, and
# # extracts these *.inv files to *.inv.txt files.
# for inventory in intersphinx_mapping:
#     if not os.path.exists(intersphinx_mapping[inventory][1]):
#         urllib.request.urlretrieve(
#             intersphinx_mapping[inventory][0] + 'objects.inv',
#             filename=intersphinx_mapping[inventory][1]
#         )
#         os.system(
#             """
#                 {{
#                     printf "\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00";
#                     tail -n +5 '{0}';
#                 }} | gunzip --quiet >'{0}.txt'
#             """.format(intersphinx_mapping[inventory][1])
#         )

intersphinx_mapping = {
    'https://docs.python.org/3.6/': None,
    'pytest': ('https://docs.pytest.org/en/latest/', None)
}

autodoc_default_flags = [
    'members',
    'private-members',
    #'special-members',
    #'undoc-members',
    'show-inheritance'
]

# Extract both the class docstring and the docstring in __init__ or __new__.
# By default, autoclass only extracts the class-level docstring.
# We used to set this to 'both', but the napoleon extension makes this
# unnecessary.  See also the `napoleon_include_init_with_doc` parameter.
#autoclass_content = 'both'

# Napoleon settings:

#napoleon_google_docstring = True
napoleon_numpy_docstring = False
# True to list __init___ docstrings separately from the class docstring.  False
# to fall back to Sphinx’s default behavior, which considers the __init___
# docstring as part of the class documentation.  Defaults to False.
napoleon_include_init_with_doc = True
#napoleon_include_private_with_doc = False
#napoleon_include_special_with_doc = True
#napoleon_use_admonition_for_examples = False
#napoleon_use_admonition_for_notes = False
#napoleon_use_admonition_for_references = False
#napoleon_use_ivar = False
#napoleon_use_param = True
#napoleon_use_keyword = True
#napoleon_use_rtype = True


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
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.

# Sphinx RTD theme:
html_theme_options = {
    #'typekit_id': 'hiw1hhg',
    #'analytics_id': None,
    #'sticky_navigation': False,
    #'logo_only': None,
    #'collapse_navigation': True,
    'collapse_navigation': False,
    #'display_version': True,
    'display_version': False,
    #'navigation_depth': 4,
    #'prev_next_buttons_location': 'bottom',
    'canonical_url': 'https://amsterdam.github.io/aiohttp_openapi_haljson/',
}

# html_theme = 'alabaster'
# html_theme_options = {
#     # 'logo': 'img/plug.png',
#     # 'logo_name': 'true',
#     'description': 'The asyncio plugin system',
#     'github_user': 'pieterb',
#     'github_repo': 'aiopluggy',
#     'github_button': 'true',
#     'github_banner': 'true',
#     'page_width': '1080px',
#     'fixed_sidebar': 'false',
# }

html_static_path = ['_static']

# Optional, for readthedocs.org.
# See also: <http://docs.readthedocs.io/en/latest/vcs.html>
html_context = {
    "display_github": True, # Integrate GitHub
    "github_user": "Amsterdam", # Username
    "github_repo": "aiopluggy", # Repo name
    "github_version": "master", # Version
    "conf_py_path": "/docs/", # Path in the checkout to the docs root
}

# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. See <http://www.sphinx-doc.org/en/stable/config.html> # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] # General information about the project. # noinspection PyShadowingBuiltins # 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. # The full version, including alpha/beta/rc tags. # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path # The name of the Pygments (syntax highlighting) style to use. # If true, `todo` and `todoList` produce output, else they produce nothing. # nitpicky = False # This value contains a list of modules to be mocked up. This is useful when # some external dependencies are not met at build time and break the building # process. You may only specify the root package of the dependencies themselves # and ommit the sub-modules: # -- Options for extensions ----------------------------------------------- # intersphinx_mapping = { #     'pytest': ('https://docs.pytest.org/en/latest/', 'pytest.inv'), #     'python': ('https://docs.python.org/3.6/', 'python.inv') # } # # import urllib.request # # # The following code downloads *.inv files from the intersphinx docsets, and # # extracts these *.inv files to *.inv.txt files. # for inventory in intersphinx_mapping: #     if not os.path.exists(intersphinx_mapping[inventory][1]): #         urllib.request.urlretrieve( #             intersphinx_mapping[inventory][0] + 'objects.inv', #             filename=intersphinx_mapping[inventory][1] #         ) #         os.system( #             """ #                 {{ #                     printf "\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00"; #                     tail -n +5 '{0}'; #                 }} | gunzip --quiet >'{0}.txt' #             """.format(intersphinx_mapping[inventory][1]) #         ) #'special-members', #'undoc-members', # Extract both the class docstring and the docstring in __init__ or __new__. # By default, autoclass only extracts the class-level docstring. # We used to set this to 'both', but the napoleon extension makes this # unnecessary.  See also the `napoleon_include_init_with_doc` parameter. #autoclass_content = 'both' # Napoleon settings: #napoleon_google_docstring = True # True to list __init___ docstrings separately from the class docstring.  False # to fall back to Sphinx’s default behavior, which considers the __init___ # docstring as part of the class documentation.  Defaults to False. #napoleon_include_private_with_doc = False #napoleon_include_special_with_doc = True #napoleon_use_admonition_for_examples = False #napoleon_use_admonition_for_notes = False #napoleon_use_admonition_for_references = False #napoleon_use_ivar = False #napoleon_use_param = True #napoleon_use_keyword = True #napoleon_use_rtype = True # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages.  See the documentation for # a list of builtin themes. # 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. # Sphinx RTD theme: #'typekit_id': 'hiw1hhg', #'analytics_id': None, #'sticky_navigation': False, #'logo_only': None, #'collapse_navigation': True, #'display_version': True, #'navigation_depth': 4, #'prev_next_buttons_location': 'bottom', # html_theme = 'alabaster' # html_theme_options = { #     # 'logo': 'img/plug.png', #     # 'logo_name': 'true', #     'description': 'The asyncio plugin system', #     'github_user': 'pieterb', #     'github_repo': 'aiopluggy', #     'github_button': 'true', #     'github_banner': 'true', #     'page_width': '1080px', #     'fixed_sidebar': 'false', # } # Optional, for readthedocs.org. # See also: <http://docs.readthedocs.io/en/latest/vcs.html> # Integrate GitHub # Username # Repo name # Version # Path in the checkout to the docs root