|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | + |
| 14 | +import sys |
| 15 | +import os |
| 16 | + |
| 17 | +os.environ["DOCUMENTATION"] = "True" |
| 18 | +sys.path.insert(0, os.path.abspath('../../src/')) |
| 19 | +sys.path.insert(0, os.path.abspath('.')) |
| 20 | + |
| 21 | +from tkclasswiz import __version__ |
| 22 | + |
| 23 | + |
| 24 | +# -- Project information ----------------------------------------------------- |
| 25 | +project = 'TkClassWizard' |
| 26 | +copyright = '2023, David Hozic' |
| 27 | +author = 'David Hozic' |
| 28 | +version = __version__ |
| 29 | + |
| 30 | + |
| 31 | +# -- General configuration --------------------------------------------------- |
| 32 | +root_doc = 'index' |
| 33 | + |
| 34 | +numfig = True |
| 35 | + |
| 36 | +# Add any Sphinx extension module names here, as strings. They can be |
| 37 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 38 | +# ones. |
| 39 | +extensions = [ |
| 40 | + "sphinx.ext.autodoc", |
| 41 | + "sphinx.ext.napoleon", |
| 42 | + "sphinx.ext.autosectionlabel", |
| 43 | + "sphinx.ext.intersphinx", |
| 44 | + "sphinx_copybutton", |
| 45 | + "enum_tools.autoenum", |
| 46 | + "sphinx_design", |
| 47 | + "sphinx_search.extension", |
| 48 | + "sphinxcontrib.inkscapeconverter" |
| 49 | +] |
| 50 | + |
| 51 | + |
| 52 | +source_suffix = { |
| 53 | + '.rst': 'restructuredtext', |
| 54 | + '.txt': 'markdown', |
| 55 | + '.md': 'markdown', |
| 56 | +} |
| 57 | + |
| 58 | +# Add any paths that contain templates here, relative to this directory. |
| 59 | +templates_path = ['_templates'] |
| 60 | + |
| 61 | +# List of patterns, relative to source directory, that match files and |
| 62 | +# directories to ignore when looking for source files. |
| 63 | +# This pattern also affects html_static_path and html_extra_path. |
| 64 | +exclude_patterns = [] |
| 65 | + |
| 66 | + |
| 67 | +# Autodoc |
| 68 | +autodoc_typehints = "signature" |
| 69 | +autodoc_typehints_format = "short" |
| 70 | + |
| 71 | + |
| 72 | +developement_build = os.environ.get("DOC_DEVELOPMENT", default="False") |
| 73 | +developement_build = True if developement_build == "True" else False |
| 74 | + |
| 75 | +autodoc_default_options = { |
| 76 | + 'member-order': 'bysource', |
| 77 | + "private-members": developement_build |
| 78 | +} |
| 79 | + |
| 80 | + |
| 81 | +# Intersphinx |
| 82 | +intersphinx_mapping = { |
| 83 | + "Python" : ("https://docs.python.org/3/", None) |
| 84 | +} |
| 85 | + |
| 86 | +# ----------- HTML ----------- # |
| 87 | +html_title = project |
| 88 | +html_theme = 'furo' |
| 89 | +html_static_path = ['_static'] |
| 90 | +html_theme_options = { |
| 91 | + "navigation_with_keys": True, |
| 92 | + "top_of_page_button": "edit", |
| 93 | + "source_repository": "https://github.com/davidhozic/TkClassWizard", |
| 94 | + "source_branch": "develop", |
| 95 | + "source_directory": "docs/source", |
| 96 | + "footer_icons": [ |
| 97 | + { |
| 98 | + "name": "GitHub", |
| 99 | + "url": "https://github.com/davidhozic/TkClassWizard", |
| 100 | + "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>', |
| 101 | + "class": "", |
| 102 | + } |
| 103 | + ], |
| 104 | +} |
| 105 | + |
| 106 | +# ----------- Latex ----------- # |
| 107 | + |
0 commit comments