We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Module level documentation no longer shown on RTD
Example:
https://jax.readthedocs.io/en/latest/jax.experimental.loops.html

This used to show the module level docstring, but not anymore.

My guess is that this might be related to inserting the line `from __future__ import annotations` into each source file?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # Copyright 2018 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # -*- coding: utf-8 -*-
16 #
17 # Configuration file for the Sphinx documentation builder.
18 #
19 # This file does only contain a selection of the most common options. For a
20 # full list see the documentation:
21 # http://www.sphinx-doc.org/en/master/config
22 
23 # -- Path setup --------------------------------------------------------------
24 
25 # If extensions (or modules to document with autodoc) are in another directory,
26 # add these directories to sys.path here. If the directory is relative to the
27 # documentation root, use os.path.abspath to make it absolute, like shown here.
28 #
29 import os
30 import sys
31 import typing
32 
33 sys.path.insert(0, os.path.abspath('..'))
34 
35 
36 # Workaround to avoid expanding type aliases. See:
37 # https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836
38 
39 # When building docs, enable `from __future__ import annotations` everywhere.
40 def _rewrite(p):
41   with open(p) as f:
42     contents = f.read()
43   with open(p, 'w') as f:
44     f.write('from __future__ import annotations\n')
45     f.write(contents)
46 
47 if 'READTHEDOCS' in os.environ:
48   for path, dirs, files in os.walk('../jax/'):
49     for file in files:
50       if file.endswith('.py'):
51         _rewrite(os.path.abspath(os.path.join(path, file)))
52 
53 # Monkey patch for the typing module to prevent it from expanding type aliases.
54 typing.get_type_hints = lambda obj, *unused: obj.__annotations__
55 
56 # -- Project information -----------------------------------------------------
57 
58 project = 'JAX'
59 copyright = '2019, Google LLC. NumPy and SciPy documentation are copyright the respective authors.'
60 author = 'The JAX authors'
61 
62 # The short X.Y version
63 version = ''
64 # The full version, including alpha/beta/rc tags
65 release = ''
66 
67 
68 # -- General configuration ---------------------------------------------------
69 
70 # If your documentation needs a minimal Sphinx version, state it here.
71 #
72 needs_sphinx = '2.1'
73 
74 # Add any Sphinx extension module names here, as strings. They can be
75 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
76 # ones.
77 extensions = [
78     'sphinx.ext.autodoc',
79     'sphinx.ext.autosummary',
80     'sphinx.ext.intersphinx',
81     'sphinx.ext.mathjax',
82     'sphinx.ext.napoleon',
83     'sphinx.ext.viewcode',
84     'nbsphinx',
85     'sphinx_autodoc_typehints',
86     'myst_parser',
87 ]
88 
89 intersphinx_mapping = {
90     'python': ('https://docs.python.org/3/', None),
91     'numpy': ('https://docs.scipy.org/doc/numpy/', None),
92     'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
93 }
94 
95 # Add any paths that contain templates here, relative to this directory.
96 templates_path = ['_templates']
97 
98 # The suffix(es) of source filenames.
99 # You can specify multiple suffix as a list of string:
100 #
101 source_suffix = '.rst'
102 
103 # The master toctree document.
104 master_doc = 'index'
105 
106 # The language for content autogenerated by Sphinx. Refer to documentation
107 # for a list of supported languages.
108 #
109 # This is also used if you do content translation via gettext catalogs.
110 # Usually you set "language" from the command line for these cases.
111 language = None
112 
113 # List of patterns, relative to source directory, that match files and
114 # directories to ignore when looking for source files.
115 # This pattern also affects html_static_path and html_extra_path.
116 exclude_patterns = [
117     # Slow notebook: long time to load tf.ds
118     'notebooks/neural_network_with_tfds_data.ipynb',
119     # Slow notebook
120     'notebooks/Neural_Network_and_Data_Loading.ipynb',
121     'notebooks/score_matching.ipynb',
122     'notebooks/maml.ipynb',
123     # Fails with shape error in XL
124     'notebooks/XLA_in_Python.ipynb',
125     # Sometimes sphinx reads its own outputs as inputs!
126     'build/html',
127 ]
128 
129 # The name of the Pygments (syntax highlighting) style to use.
130 pygments_style = None
131 
132 
133 autosummary_generate = True
134 napolean_use_rtype = False
135 
136 # -- Options for nbsphinx -----------------------------------------------------
137 
138 # Execute notebooks before conversion: 'always', 'never', 'auto' (default)
139 # We execute all notebooks, exclude the slow ones using 'exclude_patterns'
140 nbsphinx_execute = 'always'
141 
142 # Use this kernel instead of the one stored in the notebook metadata:
143 #nbsphinx_kernel_name = 'python3'
144 
145 # List of arguments to be passed to the kernel that executes the notebooks:
146 # nbsphinx_execute_arguments = []
147 
148 # If True, the build process is continued even if an exception occurs:
149 #nbsphinx_allow_errors = True
150 
151 
152 # Controls when a cell will time out (defaults to 30; use -1 for no timeout):
153 nbsphinx_timeout = 180
154 
155 # Default Pygments lexer for syntax highlighting in code cells:
156 #nbsphinx_codecell_lexer = 'ipython3'
157 
158 # Width of input/output prompts used in CSS:
159 #nbsphinx_prompt_width = '8ex'
160 
161 # If window is narrower than this, input/output prompts are on separate lines:
162 #nbsphinx_responsive_width = '700px'
163 
164 # This is processed by Jinja2 and inserted before each notebook
165 nbsphinx_prolog = r"""
166 {% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}
167 
168 .. only:: html
169 
170     .. role:: raw-html(raw)
171         :format: html
172 
173     .. nbinfo::
174 
175         Interactive online version:
176         :raw-html:`<a href="https://colab.research.google.com/github/google/jax/blob/master/{{ docname }}"><img alt="Open In Colab" src="https://colab.research.google.com/assets/colab-badge.svg" style="vertical-align:text-bottom"></a>`
177 
178     __ https://github.com/google/jax/blob/
179         {{ env.config.release }}/{{ docname }}
180 """
181 
182 # This is processed by Jinja2 and inserted after each notebook
183 # nbsphinx_epilog = r"""
184 # """
185 
186 # Input prompt for code cells. "%s" is replaced by the execution count.
187 #nbsphinx_input_prompt = 'In [%s]:'
188 
189 # Output prompt for code cells. "%s" is replaced by the execution count.
190 #nbsphinx_output_prompt = 'Out[%s]:'
191 
192 # Specify conversion functions for custom notebook formats:
193 #import jupytext
194 #nbsphinx_custom_formats = {
195 #    '.Rmd': lambda s: jupytext.reads(s, '.Rmd'),
196 #}
197 
198 # Link or path to require.js, set to empty string to disable
199 #nbsphinx_requirejs_path = ''
200 
201 # Options for loading require.js
202 #nbsphinx_requirejs_options = {'async': 'async'}
203 
204 # mathjax_config = {
205 #     'TeX': {'equationNumbers': {'autoNumber': 'AMS', 'useLabelIds': True}},
206 # }
207 
208 # Additional files needed for generating LaTeX/PDF output:
209 # latex_additional_files = ['references.bib']
210 
211 # -- Options for HTML output -------------------------------------------------
212 
213 # The theme to use for HTML and HTML Help pages.  See the documentation for
214 # a list of builtin themes.
215 #
216 html_theme = 'sphinx_rtd_theme'
217 
218 # Theme options are theme-specific and customize the look and feel of a theme
219 # further.  For a list of options available for each theme, see the
220 # documentation.
221 html_theme_options = {
222     'logo_only': True,
223 }
224 
225 # The name of an image file (relative to this directory) to place at the top
226 # of the sidebar.
227 html_logo = '_static/jax_logo_250px.png'
228 
229 # Add any paths that contain custom static files (such as style sheets) here,
230 # relative to this directory. They are copied after the builtin static files,
231 # so a file named "default.css" will overwrite the builtin "default.css".
232 html_static_path = ['_static']
233 
234 # Custom sidebar templates, must be a dictionary that maps document names
235 # to template names.
236 #
237 # The default sidebars (for documents that don't match any pattern) are
238 # defined by theme itself.  Builtin themes are using these templates by
239 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
240 # 'searchbox.html']``.
241 #
242 # html_sidebars = {}
243 
244 
245 # -- Options for HTMLHelp output ---------------------------------------------
246 
247 # Output file base name for HTML help builder.
248 htmlhelp_basename = 'JAXdoc'
249 
250 
251 # -- Options for LaTeX output ------------------------------------------------
252 
253 latex_elements = {
254     # The paper size ('letterpaper' or 'a4paper').
255     #
256     # 'papersize': 'letterpaper',
257 
258     # The font size ('10pt', '11pt' or '12pt').
259     #
260     # 'pointsize': '10pt',
261 
262     # Additional stuff for the LaTeX preamble.
263     #
264     # 'preamble': '',
265 
266     # Latex figure (float) alignment
267     #
268     # 'figure_align': 'htbp',
269 }
270 
271 # Grouping the document tree into LaTeX files. List of tuples
272 # (source start file, target name, title,
273 #  author, documentclass [howto, manual, or own class]).
274 latex_documents = [
275     (master_doc, 'JAX.tex', 'JAX Documentation',
276      'The JAX authors', 'manual'),
277 ]
278 
279 
280 # -- Options for manual page output ------------------------------------------
281 
282 # One entry per manual page. List of tuples
283 # (source start file, name, description, authors, manual section).
284 man_pages = [
285     (master_doc, 'jax', 'JAX Documentation',
286      [author], 1)
287 ]
288 
289 
290 # -- Options for Texinfo output ----------------------------------------------
291 
292 # Grouping the document tree into Texinfo files. List of tuples
293 # (source start file, target name, title, author,
294 #  dir menu entry, description, category)
295 texinfo_documents = [
296     (master_doc, 'JAX', 'JAX Documentation',
297      author, 'JAX', 'One line description of project.',
298      'Miscellaneous'),
299 ]
300 
301 
302 # -- Options for Epub output -------------------------------------------------
303 
304 # Bibliographic Dublin Core info.
305 epub_title = project
306 
307 # The unique identifier of the text. This can be a ISBN number
308 # or the project homepage.
309 #
310 # epub_identifier = ''
311 
312 # A unique identification for the text.
313 #
314 # epub_uid = ''
315 
316 # A list of files that should not be packed into the epub file.
317 epub_exclude_files = ['search.html']
318 
319 
320 # -- Extension configuration -------------------------------------------------
321 
322 # Tell sphinx-autodoc-typehints to generate stub parameter annotations including
323 # types, even if the parameters aren't explicitly documented.
324 always_document_param_types = True
325
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,30 +28,14 @@
 #
 import os
 import sys
-import typing
 
 sys.path.insert(0, os.path.abspath('..'))
 
 
-# Workaround to avoid expanding type aliases. See:
+# Currently type aliases are expanded. We tried a workaround along the lines of:
 # https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836
-
-# When building docs, enable `from __future__ import annotations` everywhere.
-def _rewrite(p):
-  with open(p) as f:
-    contents = f.read()
-  with open(p, 'w') as f:
-    f.write('from __future__ import annotations\n')
-    f.write(contents)
-
-if 'READTHEDOCS' in os.environ:
-  for path, dirs, files in os.walk('../jax/'):
-    for file in files:
-      if file.endswith('.py'):
-        _rewrite(os.path.abspath(os.path.join(path, file)))
-
-# Monkey patch for the typing module to prevent it from expanding type aliases.
-typing.get_type_hints = lambda obj, *unused: obj.__annotations__
+# Unfortunately, this workaround makes Sphinx drop module-level documentation.
+# See https://github.com/google/jax/issues/3452.
 
 # -- Project information -----------------------------------------------------

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -28,30 +28,14 @@\n #\n import os\n import sys\n-import typing\n \n sys.path.insert(0, os.path.abspath('..'))\n \n \n-# Workaround to avoid expanding type aliases. See:\n+# Currently type aliases are expanded. We tried a workaround along the lines of:\n # https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836\n-\n-# When building docs, enable `from __future__ import annotations` everywhere.\n-def _rewrite(p):\n-  with open(p) as f:\n-    contents = f.read()\n-  with open(p, 'w') as f:\n-    f.write('from __future__ import annotations\\n')\n-    f.write(contents)\n-\n-if 'READTHEDOCS' in os.environ:\n-  for path, dirs, files in os.walk('../jax/'):\n-    for file in files:\n-      if file.endswith('.py'):\n-        _rewrite(os.path.abspath(os.path.join(path, file)))\n-\n-# Monkey patch for the typing module to prevent it from expanding type aliases.\n-typing.get_type_hints = lambda obj, *unused: obj.__annotations__\n+# Unfortunately, this workaround makes Sphinx drop module-level documentation.\n+# See https://github.com/google/jax/issues/3452.\n \n # -- Project information -----------------------------------------------------\n", "issue": "Module level documentation no longer shown on RTD\nExample:\r\nhttps://jax.readthedocs.io/en/latest/jax.experimental.loops.html\r\n\r\nThis used to show the module level docstring, but not anymore.\r\n\r\nMy guess is that this might be related to inserting the line `from __future__ import annotations` into each source file?\n", "before_files": [{"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nimport typing\n\nsys.path.insert(0, os.path.abspath('..'))\n\n\n# Workaround to avoid expanding type aliases. See:\n# https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836\n\n# When building docs, enable `from __future__ import annotations` everywhere.\ndef _rewrite(p):\n  with open(p) as f:\n    contents = f.read()\n  with open(p, 'w') as f:\n    f.write('from __future__ import annotations\\n')\n    f.write(contents)\n\nif 'READTHEDOCS' in os.environ:\n  for path, dirs, files in os.walk('../jax/'):\n    for file in files:\n      if file.endswith('.py'):\n        _rewrite(os.path.abspath(os.path.join(path, file)))\n\n# Monkey patch for the typing module to prevent it from expanding type aliases.\ntyping.get_type_hints = lambda obj, *unused: obj.__annotations__\n\n# -- Project information -----------------------------------------------------\n\nproject = 'JAX'\ncopyright = '2019, Google LLC. NumPy and SciPy documentation are copyright the respective authors.'\nauthor = 'The JAX authors'\n\n# The short X.Y version\nversion = ''\n# The full version, including alpha/beta/rc tags\nrelease = ''\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '2.1'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.viewcode',\n    'nbsphinx',\n    'sphinx_autodoc_typehints',\n    'myst_parser',\n]\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'numpy': ('https://docs.scipy.org/doc/numpy/', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),\n}\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = [\n    # Slow notebook: long time to load tf.ds\n    'notebooks/neural_network_with_tfds_data.ipynb',\n    # Slow notebook\n    'notebooks/Neural_Network_and_Data_Loading.ipynb',\n    'notebooks/score_matching.ipynb',\n    'notebooks/maml.ipynb',\n    # Fails with shape error in XL\n    'notebooks/XLA_in_Python.ipynb',\n    # Sometimes sphinx reads its own outputs as inputs!\n    'build/html',\n]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n\nautosummary_generate = True\nnapolean_use_rtype = False\n\n# -- Options for nbsphinx -----------------------------------------------------\n\n# Execute notebooks before conversion: 'always', 'never', 'auto' (default)\n# We execute all notebooks, exclude the slow ones using 'exclude_patterns'\nnbsphinx_execute = 'always'\n\n# Use this kernel instead of the one stored in the notebook metadata:\n#nbsphinx_kernel_name = 'python3'\n\n# List of arguments to be passed to the kernel that executes the notebooks:\n# nbsphinx_execute_arguments = []\n\n# If True, the build process is continued even if an exception occurs:\n#nbsphinx_allow_errors = True\n\n\n# Controls when a cell will time out (defaults to 30; use -1 for no timeout):\nnbsphinx_timeout = 180\n\n# Default Pygments lexer for syntax highlighting in code cells:\n#nbsphinx_codecell_lexer = 'ipython3'\n\n# Width of input/output prompts used in CSS:\n#nbsphinx_prompt_width = '8ex'\n\n# If window is narrower than this, input/output prompts are on separate lines:\n#nbsphinx_responsive_width = '700px'\n\n# This is processed by Jinja2 and inserted before each notebook\nnbsphinx_prolog = r\"\"\"\n{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}\n\n.. only:: html\n\n    .. role:: raw-html(raw)\n        :format: html\n\n    .. nbinfo::\n\n        Interactive online version:\n        :raw-html:`<a href=\"https://colab.research.google.com/github/google/jax/blob/master/{{ docname }}\"><img alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" style=\"vertical-align:text-bottom\"></a>`\n\n    __ https://github.com/google/jax/blob/\n        {{ env.config.release }}/{{ docname }}\n\"\"\"\n\n# This is processed by Jinja2 and inserted after each notebook\n# nbsphinx_epilog = r\"\"\"\n# \"\"\"\n\n# Input prompt for code cells. \"%s\" is replaced by the execution count.\n#nbsphinx_input_prompt = 'In [%s]:'\n\n# Output prompt for code cells. \"%s\" is replaced by the execution count.\n#nbsphinx_output_prompt = 'Out[%s]:'\n\n# Specify conversion functions for custom notebook formats:\n#import jupytext\n#nbsphinx_custom_formats = {\n#    '.Rmd': lambda s: jupytext.reads(s, '.Rmd'),\n#}\n\n# Link or path to require.js, set to empty string to disable\n#nbsphinx_requirejs_path = ''\n\n# Options for loading require.js\n#nbsphinx_requirejs_options = {'async': 'async'}\n\n# mathjax_config = {\n#     'TeX': {'equationNumbers': {'autoNumber': 'AMS', 'useLabelIds': True}},\n# }\n\n# Additional files needed for generating LaTeX/PDF output:\n# latex_additional_files = ['references.bib']\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    'logo_only': True,\n}\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = '_static/jax_logo_250px.png'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'JAXdoc'\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'JAX.tex', 'JAX Documentation',\n     'The JAX authors', 'manual'),\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'jax', 'JAX Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'JAX', 'JAX Documentation',\n     author, 'JAX', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n\n# -- Extension configuration -------------------------------------------------\n\n# Tell sphinx-autodoc-typehints to generate stub parameter annotations including\n# types, even if the parameters aren't explicitly documented.\nalways_document_param_types = True\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n\n\n# Currently type aliases are expanded. We tried a workaround along the lines of:\n# https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836\n# Unfortunately, this workaround makes Sphinx drop module-level documentation.\n# See https://github.com/google/jax/issues/3452.\n\n# -- Project information -----------------------------------------------------\n\nproject = 'JAX'\ncopyright = '2019, Google LLC. NumPy and SciPy documentation are copyright the respective authors.'\nauthor = 'The JAX authors'\n\n# The short X.Y version\nversion = ''\n# The full version, including alpha/beta/rc tags\nrelease = ''\n\n\n# -- General configuration ---------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '2.1'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.viewcode',\n    'nbsphinx',\n    'sphinx_autodoc_typehints',\n    'myst_parser',\n]\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'numpy': ('https://docs.scipy.org/doc/numpy/', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),\n}\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = [\n    # Slow notebook: long time to load tf.ds\n    'notebooks/neural_network_with_tfds_data.ipynb',\n    # Slow notebook\n    'notebooks/Neural_Network_and_Data_Loading.ipynb',\n    'notebooks/score_matching.ipynb',\n    'notebooks/maml.ipynb',\n    # Fails with shape error in XL\n    'notebooks/XLA_in_Python.ipynb',\n    # Sometimes sphinx reads its own outputs as inputs!\n    'build/html',\n]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n\nautosummary_generate = True\nnapolean_use_rtype = False\n\n# -- Options for nbsphinx -----------------------------------------------------\n\n# Execute notebooks before conversion: 'always', 'never', 'auto' (default)\n# We execute all notebooks, exclude the slow ones using 'exclude_patterns'\nnbsphinx_execute = 'always'\n\n# Use this kernel instead of the one stored in the notebook metadata:\n#nbsphinx_kernel_name = 'python3'\n\n# List of arguments to be passed to the kernel that executes the notebooks:\n# nbsphinx_execute_arguments = []\n\n# If True, the build process is continued even if an exception occurs:\n#nbsphinx_allow_errors = True\n\n\n# Controls when a cell will time out (defaults to 30; use -1 for no timeout):\nnbsphinx_timeout = 180\n\n# Default Pygments lexer for syntax highlighting in code cells:\n#nbsphinx_codecell_lexer = 'ipython3'\n\n# Width of input/output prompts used in CSS:\n#nbsphinx_prompt_width = '8ex'\n\n# If window is narrower than this, input/output prompts are on separate lines:\n#nbsphinx_responsive_width = '700px'\n\n# This is processed by Jinja2 and inserted before each notebook\nnbsphinx_prolog = r\"\"\"\n{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}\n\n.. only:: html\n\n    .. role:: raw-html(raw)\n        :format: html\n\n    .. nbinfo::\n\n        Interactive online version:\n        :raw-html:`<a href=\"https://colab.research.google.com/github/google/jax/blob/master/{{ docname }}\"><img alt=\"Open In Colab\" src=\"https://colab.research.google.com/assets/colab-badge.svg\" style=\"vertical-align:text-bottom\"></a>`\n\n    __ https://github.com/google/jax/blob/\n        {{ env.config.release }}/{{ docname }}\n\"\"\"\n\n# This is processed by Jinja2 and inserted after each notebook\n# nbsphinx_epilog = r\"\"\"\n# \"\"\"\n\n# Input prompt for code cells. \"%s\" is replaced by the execution count.\n#nbsphinx_input_prompt = 'In [%s]:'\n\n# Output prompt for code cells. \"%s\" is replaced by the execution count.\n#nbsphinx_output_prompt = 'Out[%s]:'\n\n# Specify conversion functions for custom notebook formats:\n#import jupytext\n#nbsphinx_custom_formats = {\n#    '.Rmd': lambda s: jupytext.reads(s, '.Rmd'),\n#}\n\n# Link or path to require.js, set to empty string to disable\n#nbsphinx_requirejs_path = ''\n\n# Options for loading require.js\n#nbsphinx_requirejs_options = {'async': 'async'}\n\n# mathjax_config = {\n#     'TeX': {'equationNumbers': {'autoNumber': 'AMS', 'useLabelIds': True}},\n# }\n\n# Additional files needed for generating LaTeX/PDF output:\n# latex_additional_files = ['references.bib']\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    'logo_only': True,\n}\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = '_static/jax_logo_250px.png'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'JAXdoc'\n\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'JAX.tex', 'JAX Documentation',\n     'The JAX authors', 'manual'),\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'jax', 'JAX Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'JAX', 'JAX Documentation',\n     author, 'JAX', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n\n# -- Extension configuration -------------------------------------------------\n\n# Tell sphinx-autodoc-typehints to generate stub parameter annotations including\n# types, even if the parameters aren't explicitly documented.\nalways_document_param_types = True\n", "path": "docs/conf.py"}]}