| 1 | import datetime |
| 2 | import os |
| 3 | import sys |
| 4 | |
| 5 | # If extensions (or modules to document with autodoc) are in another directory, |
| 6 | # add these directories to sys.path here. If the directory is relative to the |
| 7 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 8 | sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) |
| 9 | |
| 10 | from portalocker import __about__ as metadata |
| 11 | |
| 12 | # -- General configuration ------------------------------------------------ |
| 13 | |
| 14 | # Add any Sphinx extension module names here, as strings. They can be |
| 15 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 16 | # ones. |
| 17 | extensions = [ |
| 18 | 'sphinx.ext.autodoc', |
| 19 | 'sphinx.ext.doctest', |
| 20 | 'sphinx.ext.intersphinx', |
| 21 | 'sphinx.ext.todo', |
| 22 | 'sphinx.ext.coverage', |
| 23 | 'sphinx.ext.mathjax', |
| 24 | 'sphinx.ext.ifconfig', |
| 25 | 'sphinx.ext.viewcode', |
| 26 | 'sphinx.ext.napoleon', |
| 27 | ] |
| 28 | |
| 29 | # Add any paths that contain templates here, relative to this directory. |
| 30 | templates_path = ['_templates'] |
| 31 | |
| 32 | # The suffix of source filenames. |
| 33 | source_suffix = '.rst' |
| 34 | |
| 35 | # The master toctree document. |
| 36 | master_doc = 'index' |
| 37 | |
| 38 | # General information about the project. |
| 39 | project = metadata.__package_name__.replace('-', ' ').capitalize() |
| 40 | copyright = f'{datetime.date.today().year}, <a href="http://wol.ph/">{metadata.__author__}</a>' |
| 41 | |
| 42 | # The version info for the project you're documenting, acts as replacement for |
| 43 | # |version| and |release|, also used in various other places throughout the |
| 44 | # built documents. |
| 45 | # |
| 46 | # The short X.Y version. |
| 47 | version = metadata.__version__ |
| 48 | # The full version, including alpha/beta/rc tags. |
| 49 | release = metadata.__version__ |
| 50 | |
| 51 | # List of patterns, relative to source directory, that match files and |
| 52 | # directories to ignore when looking for source files. |
| 53 | exclude_patterns = ['_build'] |
| 54 | |
| 55 | # The reST default role (used for this markup: `text`) to use for all |
| 56 | # documents. |
| 57 | default_role = 'py:obj' |
| 58 | |
| 59 | # The name of the Pygments (syntax highlighting) style to use. |
| 60 | pygments_style = 'sphinx' |
| 61 | |
| 62 | # -- Options for HTML output ---------------------------------------------- |
| 63 | |
| 64 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 65 | # a list of builtin themes. |
| 66 | html_theme = 'wolph' |
| 67 | |
| 68 | # Add any paths that contain custom themes here, relative to this directory. |
| 69 | html_theme_path = ['_theme'] |
| 70 | |
| 71 | # Add any paths that contain custom static files (such as style sheets) here, |
| 72 | # relative to this directory. They are copied after the builtin static files, |
| 73 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 74 | html_static_path = ['_static'] |
| 75 | |
| 76 | # Output file base name for HTML help builder. |
| 77 | htmlhelp_basename = metadata.__package_name__ + '-doc' |
| 78 | |
| 79 | # Example configuration for intersphinx: refer to the Python standard library. |
| 80 | intersphinx_mapping = dict( |
| 81 | python=('http://docs.python.org/3/', None), |
| 82 | ) |