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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
# 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
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "PyEPR"
copyright = "2011-2026, Antonio Valentino"
author = "Antonio Valentino"
def get_version(filename):
import re
from packaging.version import parse as Version
with open(filename, encoding="utf-8") as fd:
data = fd.read()
mobj = re.search(
r"""^__version__\s*=\s*(?P<quote>['"])(?P<version>.*)(?P=quote)""",
data,
re.MULTILINE,
)
return Version(mobj.group("version"))
_version = get_version("../src/epr/__init__.py")
version = _version.base_version
release = str(_version)
# -- 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",
"IPython.sphinxext.ipython_console_highlighting",
"IPython.sphinxext.ipython_directive",
]
templates_path = ["_templates"]
master_doc = "index"
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"**/empty.txt",
]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
# html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
# 'prev_next_buttons_location': 'both',
}
html_static_path = ["_static"]
html_last_updated_fmt = "%b %d, %Y"
html_sidebars = {
"index": [
## 'globaltoc.html',
## 'relations.html',
## 'sourcelink.html',
## 'searchbox.html',
# "pypi.html",
# "gha.html",
# "readthedocs.html",
# "codecov.html",
# "ohloh.html",
],
}
html_domain_indices = False
html_context = {
"display_github": True,
"github_user": "avalentino",
"github_repo": "pyepr",
"github_version": "master",
"conf_py_path": "/docs/",
}
mathjax_path = "file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
# -- Options for HTMLHelp output ------------------------------------------
htmlhelp_basename = "PyEPRdoc"
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
"papersize": "a4paper",
"pointsize": "12pt",
# 'preamble': '',
# 'figure_align': 'htbp',
}
latex_documents = [
(master_doc, "pyepr.tex", "PyEPR Documentation", author, "manual"),
]
latex_domain_indices = False
# -- Options for manual page output ---------------------------------------
man_pages = [(master_doc, "pyepr", "PyEPR Documentation", [author], 1)]
# -- Options for Texinfo output -------------------------------------------
texinfo_documents = [
(
master_doc,
"PyEPR",
"PyEPR Documentation",
author,
"PyEPR",
"One line description of project.",
"Miscellaneous",
),
]
# -- Options for Epub output ----------------------------------------------
epub_exclude_files = ["search.html"]
# -- Options for linkcheck ------------------------------------------------
linkcheck_ignore = [f"https://pyepr.readthedocs.io/en/v{version}"]
# -- Extension configuration -------------------------------------------------
# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"python": ("https://docs.python.org/3",
"/usr/share/doc/python3-doc/html/objects.inv"),
# "numpy": ("https://docs.scipy.org/doc/numpy",
# "/usr/share/doc/python-numpy-doc/html/objects.inv"),
}
# -- Options for extlinks extension ------------------------------------------
extlinks = {
"issue": ("https://github.com/avalentino/pyepr/issues/%s", "gh-%s"),
}
# -- Options for todo extension ----------------------------------------------
todo_include_todos = True
|