2020-04-27 01:21:31 -06:00
|
|
|
import os, sys
|
|
|
|
sys.path.insert(0, os.path.abspath("."))
|
|
|
|
|
2024-01-17 10:49:50 -07:00
|
|
|
import time
|
2021-12-09 22:39:50 -07:00
|
|
|
import amaranth
|
2020-04-27 01:21:31 -06:00
|
|
|
|
2024-01-17 10:49:50 -07:00
|
|
|
project = "Amaranth language & toolchain"
|
2024-01-04 04:17:50 -07:00
|
|
|
version = amaranth.__version__.replace(".editable", "")
|
2020-04-27 01:21:31 -06:00
|
|
|
release = version.split("+")[0]
|
2024-01-17 10:49:50 -07:00
|
|
|
copyright = time.strftime("2020—%Y, Amaranth project contributors")
|
2020-04-27 01:21:31 -06:00
|
|
|
|
|
|
|
extensions = [
|
|
|
|
"sphinx.ext.intersphinx",
|
|
|
|
"sphinx.ext.doctest",
|
|
|
|
"sphinx.ext.todo",
|
2021-12-12 22:48:31 -07:00
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.napoleon",
|
2020-04-27 01:21:31 -06:00
|
|
|
"sphinx_rtd_theme",
|
2020-07-05 17:39:47 -06:00
|
|
|
"sphinxcontrib.platformpicker",
|
2020-04-27 01:21:31 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
with open(".gitignore") as f:
|
|
|
|
exclude_patterns = [line.strip() for line in f.readlines()]
|
|
|
|
|
2021-12-10 23:32:32 -07:00
|
|
|
root_doc = "cover"
|
2020-07-01 02:03:57 -06:00
|
|
|
|
2020-04-27 01:21:31 -06:00
|
|
|
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
|
|
|
|
|
|
|
todo_include_todos = True
|
|
|
|
|
2023-02-20 15:58:38 -07:00
|
|
|
autodoc_member_order = "bysource"
|
|
|
|
autodoc_default_options = {
|
|
|
|
"members": True
|
|
|
|
}
|
|
|
|
autodoc_preserve_defaults = True
|
|
|
|
|
2021-12-12 22:48:31 -07:00
|
|
|
napoleon_google_docstring = False
|
|
|
|
napoleon_numpy_docstring = True
|
|
|
|
napoleon_use_ivar = True
|
2023-02-20 15:58:38 -07:00
|
|
|
napoleon_include_init_with_doc = True
|
|
|
|
napoleon_include_special_with_doc = True
|
2021-12-12 23:23:12 -07:00
|
|
|
napoleon_custom_sections = ["Platform overrides"]
|
2021-12-12 22:48:31 -07:00
|
|
|
|
2020-04-27 01:21:31 -06:00
|
|
|
html_theme = "sphinx_rtd_theme"
|
|
|
|
html_static_path = ["_static"]
|
|
|
|
html_css_files = ["custom.css"]
|
2024-01-04 04:28:04 -07:00
|
|
|
html_logo = "_static/logo.png"
|
2023-08-17 18:12:18 -06:00
|
|
|
|
|
|
|
rst_prolog = """
|
2024-02-13 03:31:44 -07:00
|
|
|
.. role:: py(code)
|
2023-08-17 18:12:18 -06:00
|
|
|
:language: python
|
|
|
|
"""
|
2024-02-15 12:35:21 -07:00
|
|
|
|
|
|
|
linkcheck_ignore = [
|
|
|
|
r"^http://127\.0\.0\.1:8000$"
|
|
|
|
]
|
|
|
|
|
|
|
|
linkcheck_anchors_ignore_for_url = [
|
|
|
|
r"^https://matrix\.to/",
|
|
|
|
r"^https://web\.libera\.chat/",
|
|
|
|
# React page with README content included as a JSON payload.
|
|
|
|
r"^https://github\.com/[^/]+/[^/]+/$",
|
|
|
|
]
|