#!/usr/bin/env python3
#
# Mimesis documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 18 14:11:49 2016.
#
# 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.f
#
# 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.
#
import os
import sys

sys.path.insert(0, os.path.abspath(".."))

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

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# 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.autodoc",
    "sphinx.ext.todo",
    "sphinx.ext.viewcode",
    "sphinx.ext.duration",
    # See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
    "sphinx.ext.intersphinx",
    "sphinx_copybutton",
    "sphinx.ext.autosectionlabel",
    "sphinx_autodoc_typehints",
]

intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

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

# The encoding of source files.
#
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = "index"

# General information about the project.
project = "Mimesis"
copyright = "2017-Present, Isaak Uchakaev (Likid Geimfari) & contributors"
author = "Isaak Uchakaev (Likid Geimfari)"

# 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 = "20.0"
# The full version, including alpha/beta/rc tags.
release = "20.0.0"

# 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"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
# today = ''
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'

# 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 = ["_build", "Thumbs.db", ".DS_Store"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "friendly"
pygments_dark_style = "github-dark"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False

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

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

html_theme = "furo"
html_title = "Mimesis"
html_short_title = "Mimesis"
html_logo = "./_static/images/09.png"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_copy_source = False
html_show_sourcelink = False
html_show_sphinx = False

# Furo — modern, developer-friendly theme (works great on Read the Docs).
# Body: Source Sans 3; monospace: Fira Code.
html_theme_options = {
    "sidebar_hide_name": True,
    "navigation_with_keys": True,
    "top_of_page_button": "edit",
    "source_repository": "https://github.com/lk-geimfari/mimesis/",
    "source_branch": "master",
    "source_directory": "docs/",
    "light_css_variables": {
        "font-stack": '"Source Sans 3", "Segoe UI", system-ui, sans-serif',
        "font-stack--monospace": '"Fira Code", ui-monospace, monospace',
        "font-size--normal": "16.5px",
        "font-size--small": "14.5px",
        "line-height": "1.65",
        # Accent from octopus logo (~#b45a1e)
        "color-brand-primary": "#b45a1e",
        "color-brand-content": "#c2410c",
        "color-link": "#c2410c",
        "color-link--hover": "#9a3412",
        "color-link--visited": "#c2410c",
        "color-link--visited--hover": "#9a3412",
        "color-link-underline": "#ea580c",
        "color-link-underline--hover": "#c2410c",
        "color-link-underline--visited": "#ea580c",
        "color-link-underline--visited--hover": "#c2410c",
        "color-api-name": "#b45a1e",
        "color-api-pre-name": "#9a3412",
        "color-highlight-on-target": "#ffedd5",
        "color-admonition-title--note": "#c2410c",
        "color-admonition-title-background--note": "#fff7ed",
        "color-code-background": "#fafaf9",
        "color-code-foreground": "#1c1917",
        "color-sidebar-background": "#fafaf9",
        "color-sidebar-item-background--hover": "#fff7ed",
        "color-foreground-primary": "#1c1917",
        "color-foreground-secondary": "#44403c",
        "color-background-primary": "#ffffff",
        "color-background-secondary": "#fafaf9",
        "color-background-hover": "#f5f5f4",
    },
    "dark_css_variables": {
        "font-stack": '"Source Sans 3", "Segoe UI", system-ui, sans-serif',
        "font-stack--monospace": '"Fira Code", ui-monospace, monospace',
        "color-brand-primary": "#f97316",
        "color-brand-content": "#fb923c",
        "color-link": "#fb923c",
        "color-link--hover": "#fdba74",
        "color-link--visited": "#fb923c",
        "color-link--visited--hover": "#fdba74",
        "color-link-underline": "#f97316",
        "color-link-underline--hover": "#fb923c",
        "color-link-underline--visited": "#f97316",
        "color-link-underline--visited--hover": "#fb923c",
        "color-api-name": "#fb923c",
        "color-api-pre-name": "#fdba74",
        "color-highlight-on-target": "#7c2d12",
        "color-admonition-title--note": "#fb923c",
        "color-admonition-title-background--note": "#431407",
        "color-code-background": "#1c1917",
        "color-code-foreground": "#e7e5e4",
        "color-sidebar-background": "#0c0a09",
        "color-sidebar-item-background--hover": "#431407",
        "color-foreground-primary": "#e7e5e4",
        "color-foreground-secondary": "#a8a29e",
        "color-background-primary": "#0c0a09",
        "color-background-secondary": "#1c1917",
        "color-background-hover": "#292524",
        "color-background-border": "#292524",
    },
    "footer_icons": [
        {
            "name": "GitHub",
            "url": "https://github.com/lk-geimfari/mimesis",
            "html": """
                <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
                    <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
                </svg>
            """,
            "class": "",
        },
        {
            "name": "PyPI",
            "url": "https://pypi.org/project/mimesis/",
            "html": """
                <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
                    <path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.5 4.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1Zm0 3h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1Zm0 3h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1Z"/>
                </svg>
            """,
            "class": "",
        },
    ],
}

html_sidebars = {
    "**": [
        "sidebar/scroll-start.html",
        "sidebar/brand.html",
        "sidebar/search.html",
        "sidebar/navigation.html",
        "sidebars/useful_links.html",
        "sidebar/ethical-ads.html",
        "sidebar/scroll-end.html",
    ]
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}

# If false, no module index is generated.
#
# html_domain_indices = True

# If false, no index is generated.
#
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#
# html_split_index = False

# If true, links to the reST sources are added to the pages.
#
# html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
#   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
#   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = "Mimesisdoc"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #
    # 'papersize': 'letterpaper',
    # The font size ('10pt', '11pt' or '12pt').
    #
    # 'pointsize': '10pt',
    # Additional stuff for the LaTeX preamble.
    #
    # 'preamble': '',
    # Latex figure (float) alignment
    #
    # 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    (master_doc, "Mimesis.tex", "Mimesis Documentation", "Isaak Uchakaev", "manual"),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#
# latex_use_parts = False

# If true, show page references after internal links.
#
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#
# latex_appendices = []

# It false, will not define \strong, \code, 	itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True

# If false, no module index is generated.
#
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "mimesis", "Mimesis Documentation", [author], 1)]

# If true, show URL addresses after external links.
#
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
    (
        master_doc,
        "Mimesis",
        "Mimesis Documentation",
        author,
        "Mimesis",
        "Mimesis is a robust fake data generator.",
        "Miscellaneous",
    ),
]

# Documents to append as an appendix to all manuals.
#
# texinfo_appendices = []

# If false, no module index is generated.
#
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False
