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
|
import os
import sys
from datetime import datetime, timezone
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath(".."))
import semantic_release # noqa: E402
author_name = "Python Semantic Release Team"
# -- General configuration ------------------------------------------------
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinxcontrib.apidoc",
]
autodoc_default_options = {"ignore-module-all": True}
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"
project = "python-semantic-release"
current_year = datetime.now(timezone.utc).astimezone().year
copyright = f"{current_year}, {author_name}" # noqa: A001
version = semantic_release.__version__
release = semantic_release.__version__
exclude_patterns = ["_build"]
pygments_style = "sphinx"
html_theme = "furo"
htmlhelp_basename = "python-semantic-releasedoc"
# -- Automatically run sphinx-apidoc --------------------------------------
docs_path = os.path.dirname(__file__)
apidoc_output_dir = os.path.join(docs_path, "api", "modules")
apidoc_module_dir = os.path.join(docs_path, "..", "src")
apidoc_separate_modules = True
apidoc_module_first = True
apidoc_extra_args = ["-d", "3"]
def setup(app): # type: ignore[no-untyped-def] # noqa: ARG001,ANN001,ANN201
pass
# -- Options for LaTeX output ---------------------------------------------
latex_documents = [
(
"index",
"python-semantic-release.tex",
"python-semantic-release Documentation",
author_name,
"manual",
),
]
# -- Options for manual page output ---------------------------------------
man_pages = [
(
"index",
"python-semantic-release",
"python-semantic-release Documentation",
[author_name],
1,
)
]
# -- Options for Texinfo output -------------------------------------------
texinfo_documents = [
(
"index",
"python-semantic-release",
"python-semantic-release Documentation",
author_name,
"python-semantic-release",
"One line description of project.",
"Miscellaneous",
),
]
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = "python-semantic-release"
epub_author = author_name
epub_publisher = author_name
epub_copyright = copyright
epub_exclude_files = ["search.html"]
|