1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
import os
import sys
sys.path.insert(0, os.path.abspath(".."))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "bpack"
copyright = "2020-2024, Antonio Valentino" # noqa: D100
author = "Antonio Valentino"
# The full version, including alpha/beta/rc tags
import bpack # noqa: E402
release = bpack.__version__
master_doc = "index"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
# "sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.duration",
"sphinx.ext.extlinks",
# "sphinx.ext.githubpages",
# "sphinx.ext.graphviz",
"sphinx.ext.ifconfig",
# "sphinx.ext.imgconverter",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.intersphinx",
# "sphinx.ext.linkcode", # needs_sphinx = "1.2"
# "sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
# "sphinx.ext.imgmath",
# "sphinx.ext.jsmath",
# "sphinx.ext.mathjax",
"sphinx_rtd_theme",
]
try:
import sphinxcontrib.spelling # noqa: F401
except ImportError:
pass
else:
extensions.append("sphinxcontrib.spelling")
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_theme_options = {
# 'vcs_pageview_mode': 'blob',
}
html_context = {
# 'github_url': 'https://github.com/avalentino/bpack/',
"display_github": True,
"github_user": "avalentino",
"github_repo": "bpack",
"github_version": "main",
"conf_py_path": "/docs/", # Path in the checkout to the docs root
}
html_last_updated_fmt = ""
# -- Options for LaTeX output ------------------------------------------------
latex_documents = [
# (startdocname, targetname, title, author, theme, toctree_only)
(
project,
project + ".tex",
"Binary data structures (un-)Packing library",
author,
"manual",
False,
),
]
latex_domain_indices = False
latex_elements = {
# 'papersize': 'a4paper',
"pointsize": "12pt",
}
# -- Extension configuration -------------------------------------------------
# -- Options for autodoc extension -------------------------------------------
# autoclass_content = 'both'
autodoc_member_order = "groupwise"
# autodoc_default_options = {
# "members": True,
# "undoc-members": True,
# "show-inheritance": True,
# }
autodoc_mock_imports = []
for module_name in ["bitarray", "bitstruct", "numpy"]:
try:
__import__(module_name)
except ImportError:
autodoc_mock_imports.append(module_name)
# -- Options for autosummary extension ---------------------------------------
autosummary_generate = True
# autosummary_mock_imports = []
# autosummary_ignore_module_all = False
# -- Options for intersphinx extension ---------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}
# -- Options for extlinks extension ------------------------------------------
extlinks = {
"issue": ("https://github.com/avalentino/bpack/issues/%s", "gh-%s"),
}
# -- Options for todo extension ----------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration
todo_include_todos = True
|