|
1 | | -import os |
| 1 | +from documenteer.conf.guide import * |
2 | 2 |
|
3 | | -import lsst_sphinx_bootstrap_theme |
4 | | - |
5 | | -import kafkit |
6 | | - |
7 | | -# Common links and substitutions ============================================= |
8 | | - |
9 | | -rst_epilog = """ |
10 | | -
|
11 | | -.. _aiohttp: https://aiohttp.readthedocs.io/en/stable/ |
12 | | -.. _aiokafka: https://aiokafka.readthedocs.io/en/stable/ |
13 | | -.. _Confluent Schema Registry: https://docs.confluent.io/current/schema-registry/docs/index.html |
14 | | -.. _Confluent Wire Format: https://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html#wire-format |
15 | | -.. _mypy: http://www.mypy-lang.org |
16 | | -.. _pre-commit: https://pre-commit.com |
17 | | -.. _pytest: https://docs.pytest.org/en/latest/ |
18 | | -.. _Schema Evolution and Compatibility: https://docs.confluent.io/current/schema-registry/avro.html |
19 | | -.. _Strimzi: https://strimzi.io |
20 | | -.. _tox: https://tox.readthedocs.io/en/latest/ |
21 | | -""" |
22 | | - |
23 | | -# Extensions ================================================================= |
24 | | - |
25 | | -extensions = [ |
26 | | - "myst_parser", |
27 | | - "sphinx.ext.autodoc", |
28 | | - "sphinx.ext.napoleon", |
29 | | - "sphinx.ext.doctest", |
30 | | - "sphinx.ext.intersphinx", |
31 | | - "sphinx.ext.todo", |
32 | | - "sphinx-prompt", |
33 | | - "sphinx_automodapi.automodapi", |
34 | | - "sphinx_automodapi.smart_resolver", |
35 | | - "documenteer.sphinxext", |
36 | | -] |
37 | | - |
38 | | -# General configuration ====================================================== |
39 | | - |
40 | | -source_suffix = { |
41 | | - ".rst": "restructuredtext", |
42 | | - ".txt": "markdown", |
43 | | - ".md": "markdown", |
44 | | -} |
45 | | - |
46 | | -# The root toctree document. |
47 | | -root_doc = "index" |
48 | | - |
49 | | -# General information about the project. |
50 | | -project = "Kafkit" |
51 | | -copyright = ( |
52 | | - "2019-2022 " |
53 | | - "Association of Universities for Research in Astronomy, Inc. (AURA)" |
54 | | -) |
55 | | -author = "LSST Data Management" |
56 | | - |
57 | | -version = kafkit.__version__ |
58 | | -release = version |
59 | | - |
60 | | -# List of patterns, relative to source directory, that match files and |
61 | | -# directories to ignore when looking for source files. |
62 | | -exclude_patterns = ["_build", "README.rst"] |
63 | | - |
64 | | -# The name of the Pygments (syntax highlighting) style to use. |
65 | | -pygments_style = "sphinx" |
66 | | - |
67 | | -# The reST default role cross-links Python (used for this markup: `text`) |
68 | | -default_role = "py:obj" |
69 | | - |
70 | | -nitpick_ignore = [ |
71 | | - # Ignore missing cross-references for modules that don't provide |
72 | | - # intersphinx. The documentation itself should use double-quotes instead |
73 | | - # of single-quotes to not generate a reference, but automatic references |
74 | | - # are generated from the type signatures and can't be avoided. |
75 | | - ("py:obj", "aiokafka.AIOKafkaProducer.send_and_wait"), |
76 | | -] |
77 | | - |
78 | | -# Intersphinx ================================================================ |
79 | | - |
80 | | -intersphinx_mapping = { |
81 | | - "python": ("https://docs.python.org/3/", None), |
82 | | - "aiohttp": ("https://aiohttp.readthedocs.io/en/stable/", None), |
83 | | - "aiokafka": ("https://aiokafka.readthedocs.io/en/stable/", None), |
84 | | - "fastavro": ("https://fastavro.readthedocs.io/en/latest/", None), |
85 | | -} |
86 | | - |
87 | | -intersphinx_timeout = 10.0 # seconds |
88 | | -intersphinx_cache_limit = 5 # days |
89 | | - |
90 | | -# Linkcheck builder ========================================================== |
91 | | - |
92 | | -linkcheck_retries = 2 |
93 | | - |
94 | | -linkcheck_ignore = [ |
95 | | - r"^https://jira.lsstcorp.org/browse/", |
96 | | - r"^http://registry:8081", |
97 | | -] |
98 | 3 |
|
99 | 4 | linkcheck_anchors_ignore = [ |
100 | 5 | r"^!", |
|
104 | 9 | r"errors", |
105 | 10 | ] |
106 | 11 |
|
107 | | -linkcheck_timeout = 15 |
108 | | - |
109 | | -# HTML builder =============================================================== |
110 | | - |
111 | | -templates_path = [ |
112 | | - "_templates", |
113 | | - lsst_sphinx_bootstrap_theme.get_html_templates_path(), |
114 | | -] |
115 | | - |
116 | | -html_theme = "lsst_sphinx_bootstrap_theme" |
117 | | -html_theme_path = [lsst_sphinx_bootstrap_theme.get_html_theme_path()] |
118 | | - |
119 | | -html_context = {} |
120 | | - |
121 | | -# Theme options are theme-specific and customize the look and feel of a theme |
122 | | -# further. For a list of options available for each theme, see the |
123 | | -# documentation. |
124 | | -html_theme_options = {"logotext": project} |
125 | | - |
126 | | -# The name for this set of Sphinx documents. If None, it defaults to |
127 | | -# "<project> v<release> documentation". |
128 | | -html_title = f"{project} v{version}" |
129 | | - |
130 | | -# A shorter title for the navigation bar. Default is the same as html_title. |
131 | | -html_short_title = project |
132 | | - |
133 | | -# Add any paths that contain custom static files (such as style sheets) here, |
134 | | -# relative to this directory. They are copied after the builtin static files, |
135 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
136 | | -html_static_path = [] |
137 | | - |
138 | | -# If true, links to the reST sources are added to the pages. |
139 | | -html_show_sourcelink = False |
140 | | - |
141 | | -# Do not copy reST source for each page into the build |
142 | | -html_copy_source = False |
143 | | - |
144 | | -# If false, no module index is generated. |
145 | | -html_domain_indices = True |
146 | | - |
147 | | -# If false, no index is generated. |
148 | | -html_use_index = True |
149 | | - |
150 | | -# API Reference ============================================================== |
151 | | - |
152 | | -napoleon_google_docstring = False |
153 | | -napoleon_numpy_docstring = True |
154 | | -napoleon_include_init_with_doc = False |
155 | | -napoleon_include_private_with_doc = False |
156 | | -napoleon_include_special_with_doc = True |
157 | | -napoleon_use_admonition_for_examples = False |
158 | | -napoleon_use_admonition_for_notes = False |
159 | | -napoleon_use_admonition_for_references = False |
160 | | -napoleon_use_ivar = False |
161 | | -napoleon_use_keyword = True |
162 | | -napoleon_use_param = True |
163 | | -napoleon_use_rtype = True |
164 | | - |
165 | 12 | napoleon_type_aliases = { |
166 | 13 | # resolves confusion between sans-io version of impl specific version |
167 | 14 | "RegistryApi": "kafkit.registry.sansio.RegistryApi", |
168 | 15 | # Napoleon doesn't resolve whats under TYPE_CHECKING |
169 | 16 | "ClientSession": "aiohttp.ClientSession", |
170 | 17 | "optional": "typing.Optional", |
171 | 18 | } |
172 | | - |
173 | | -autosummary_generate = True |
174 | | - |
175 | | -automodapi_toctreedirnm = "api" |
176 | | -automodsumm_inherited_members = True |
177 | | - |
178 | | -# Docstrings for classes and methods are inherited from parents. |
179 | | -autodoc_inherit_docstrings = True |
180 | | - |
181 | | -# Class documentation should only contain the class docstring and |
182 | | -# ignore the __init__ docstring, account to LSST coding standards. |
183 | | -autoclass_content = "class" |
184 | | - |
185 | | -# Default flags for automodapi directives. Special members are dunder |
186 | | -# methods. |
187 | | -autodoc_default_options = { |
188 | | - "show-inheritance": True, |
189 | | - "special-members": True, |
190 | | -} |
191 | | - |
192 | | -# Render inheritance diagrams in SVG |
193 | | -graphviz_output_format = "svg" |
194 | | - |
195 | | -graphviz_dot_args = [ |
196 | | - "-Nfontsize=10", |
197 | | - "-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
198 | | - "-Efontsize=10", |
199 | | - "-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
200 | | - "-Gfontsize=10", |
201 | | - "-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif", |
202 | | -] |
203 | | - |
204 | | -# TODO extension ============================================================= |
205 | | - |
206 | | -todo_include_todos = False |
207 | | - |
208 | | -# My-ST (Markdown) =========================================================== |
209 | | -# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html |
210 | | - |
211 | | -myst_enable_extensions = [ |
212 | | - "amsmath", |
213 | | - "dollarmath", |
214 | | - "colon_fence", |
215 | | - "deflist", |
216 | | - "fieldlist", |
217 | | - "html_admonition", |
218 | | - "html_image", |
219 | | - "linkify", |
220 | | - "replacements", |
221 | | - "smartquotes", |
222 | | - "strikethrough", |
223 | | - "substitution", |
224 | | - "tasklist", |
225 | | -] |
0 commit comments