We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[QoL] Add copy button in docs code snippets
Since I'm a bit lazy, I'd like to have a "copy to clipboard" button in jax docs to copy over code snippets instead of drag-select-copying it.  Like this:

![image](https://user-images.githubusercontent.com/56438982/155105866-317c1ca8-5c1e-4809-be2a-2cf3a3145d23.png)

Dupicate Checks:
Nothing relevant comes up when searching for "copy button", "docs copy button" or even "button" for that matter.

--- 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 
32 sys.path.insert(0, os.path.abspath('..'))
33 
34 
35 # Currently type aliases are expanded. We tried a workaround along the lines of:
36 # https://github.com/sphinx-doc/sphinx/issues/6518#issuecomment-589613836
37 # Unfortunately, this workaround makes Sphinx drop module-level documentation.
38 # See https://github.com/google/jax/issues/3452.
39 
40 # -- Project information -----------------------------------------------------
41 
42 project = 'JAX'
43 copyright = '2020, Google LLC. NumPy and SciPy documentation are copyright the respective authors.'
44 author = 'The JAX authors'
45 
46 # The short X.Y version
47 version = ''
48 # The full version, including alpha/beta/rc tags
49 release = ''
50 
51 
52 # -- General configuration ---------------------------------------------------
53 
54 # If your documentation needs a minimal Sphinx version, state it here.
55 #
56 needs_sphinx = '2.1'
57 
58 # Add any Sphinx extension module names here, as strings. They can be
59 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
60 # ones.
61 sys.path.append(os.path.abspath('sphinxext'))
62 extensions = [
63     'sphinx.ext.autodoc',
64     'sphinx.ext.autosummary',
65     'sphinx.ext.intersphinx',
66     'sphinx.ext.mathjax',
67     'sphinx.ext.napoleon',
68     'sphinx.ext.viewcode',
69     'matplotlib.sphinxext.plot_directive',
70     'sphinx_autodoc_typehints',
71     'myst_nb',
72     "sphinx_remove_toctrees",
73     'jax_extensions',
74 ]
75 
76 intersphinx_mapping = {
77     'python': ('https://docs.python.org/3/', None),
78     'numpy': ('https://numpy.org/doc/stable/', None),
79     'scipy': ('https://docs.scipy.org/doc/scipy-1.8.0/html-scipyorg/', None),
80 }
81 
82 suppress_warnings = [
83     'ref.citation',  # Many duplicated citations in numpy/scipy docstrings.
84     'ref.footnote',  # Many unreferenced footnotes in numpy/scipy docstrings
85 ]
86 
87 # Add any paths that contain templates here, relative to this directory.
88 templates_path = ['_templates']
89 
90 # The suffix(es) of source filenames.
91 # Note: important to list ipynb before md here: we have both md and ipynb
92 # copies of each notebook, and myst will choose which to convert based on
93 # the order in the source_suffix list. Notebooks which are not executed have
94 # outputs stored in ipynb but not in md, so we must convert the ipynb.
95 source_suffix = ['.rst', '.ipynb', '.md']
96 
97 # The main toctree document.
98 main_doc = 'index'
99 
100 # The language for content autogenerated by Sphinx. Refer to documentation
101 # for a list of supported languages.
102 #
103 # This is also used if you do content translation via gettext catalogs.
104 # Usually you set "language" from the command line for these cases.
105 language = None
106 
107 # List of patterns, relative to source directory, that match files and
108 # directories to ignore when looking for source files.
109 # This pattern also affects html_static_path and html_extra_path.
110 exclude_patterns = [
111     # Sometimes sphinx reads its own outputs as inputs!
112     'build/html',
113     'build/jupyter_execute',
114     'notebooks/README.md',
115     'README.md',
116     # Ignore markdown source for notebooks; myst-nb builds from the ipynb
117     # These are kept in sync using the jupytext pre-commit hook.
118     'notebooks/*.md',
119     'design_notes/type_promotion.md',
120     # TODO: revert to jax-101/*.md once 08-pjit has a notebook
121     'jax-101/01-jax-basics.md',
122     'jax-101/02-jitting.md',
123     'jax-101/03-vectorization.md',
124     'jax-101/04-advanced-autodiff.md',
125     'jax-101/05-random-numbers.md',
126     'jax-101/05.1-pytrees.md',
127     'jax-101/06-parallelism.md',
128     'jax-101/07-state.md',
129     'autodidax.md',
130     # Attempt to fix RTD build failure
131     'transformations.md',
132 ]
133 
134 # The name of the Pygments (syntax highlighting) style to use.
135 pygments_style = None
136 
137 
138 autosummary_generate = True
139 napolean_use_rtype = False
140 
141 # mathjax_config = {
142 #     'TeX': {'equationNumbers': {'autoNumber': 'AMS', 'useLabelIds': True}},
143 # }
144 
145 # Additional files needed for generating LaTeX/PDF output:
146 # latex_additional_files = ['references.bib']
147 
148 # -- Options for HTML output -------------------------------------------------
149 
150 # The theme to use for HTML and HTML Help pages.  See the documentation for
151 # a list of builtin themes.
152 #
153 html_theme = 'sphinx_book_theme'
154 
155 # Theme options are theme-specific and customize the look and feel of a theme
156 # further.  For a list of options available for each theme, see the
157 # documentation.
158 html_theme_options = {
159     'logo_only': True,
160     'show_toc_level': 2,
161 }
162 
163 # The name of an image file (relative to this directory) to place at the top
164 # of the sidebar.
165 html_logo = '_static/jax_logo_250px.png'
166 
167 html_favicon = '_static/favicon.png'
168 
169 # Add any paths that contain custom static files (such as style sheets) here,
170 # relative to this directory. They are copied after the builtin static files,
171 # so a file named "default.css" will overwrite the builtin "default.css".
172 html_static_path = ['_static']
173 
174 # Custom sidebar templates, must be a dictionary that maps document names
175 # to template names.
176 #
177 # The default sidebars (for documents that don't match any pattern) are
178 # defined by theme itself.  Builtin themes are using these templates by
179 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
180 # 'searchbox.html']``.
181 #
182 # html_sidebars = {}
183 
184 # -- Options for myst ----------------------------------------------
185 jupyter_execute_notebooks = "force"
186 execution_allow_errors = False
187 execution_fail_on_error = True  # Requires https://github.com/executablebooks/MyST-NB/pull/296
188 
189 # Notebook cell execution timeout; defaults to 30.
190 execution_timeout = 100
191 
192 # List of patterns, relative to source directory, that match notebook
193 # files that will not be executed.
194 execution_excludepatterns = [
195     # Slow notebook: long time to load tf.ds
196     'notebooks/neural_network_with_tfds_data.*',
197     # Slow notebook
198     'notebooks/Neural_Network_and_Data_Loading.*',
199     # Strange error apparently due to asynchronous cell execution
200     'notebooks/thinking_in_jax.*',
201     # TODO(jakevdp): enable execution on these
202     'design_notes/type_promotion.*',
203     'jax-101/*',
204     'notebooks/xmap_tutorial.*',
205 ]
206 
207 # -- Options for HTMLHelp output ---------------------------------------------
208 
209 # Output file base name for HTML help builder.
210 htmlhelp_basename = 'JAXdoc'
211 
212 
213 # -- Options for LaTeX output ------------------------------------------------
214 
215 latex_elements = {
216     # The paper size ('letterpaper' or 'a4paper').
217     #
218     # 'papersize': 'letterpaper',
219 
220     # The font size ('10pt', '11pt' or '12pt').
221     #
222     # 'pointsize': '10pt',
223 
224     # Additional stuff for the LaTeX preamble.
225     #
226     # 'preamble': '',
227 
228     # Latex figure (float) alignment
229     #
230     # 'figure_align': 'htbp',
231 }
232 
233 # Grouping the document tree into LaTeX files. List of tuples
234 # (source start file, target name, title,
235 #  author, documentclass [howto, manual, or own class]).
236 latex_documents = [
237     (main_doc, 'JAX.tex', 'JAX Documentation',
238      'The JAX authors', 'manual'),
239 ]
240 
241 
242 # -- Options for manual page output ------------------------------------------
243 
244 # One entry per manual page. List of tuples
245 # (source start file, name, description, authors, manual section).
246 man_pages = [
247     (main_doc, 'jax', 'JAX Documentation',
248      [author], 1)
249 ]
250 
251 
252 # -- Options for Texinfo output ----------------------------------------------
253 
254 # Grouping the document tree into Texinfo files. List of tuples
255 # (source start file, target name, title, author,
256 #  dir menu entry, description, category)
257 texinfo_documents = [
258     (main_doc, 'JAX', 'JAX Documentation',
259      author, 'JAX', 'One line description of project.',
260      'Miscellaneous'),
261 ]
262 
263 
264 # -- Options for Epub output -------------------------------------------------
265 
266 # Bibliographic Dublin Core info.
267 epub_title = project
268 
269 # The unique identifier of the text. This can be a ISBN number
270 # or the project homepage.
271 #
272 # epub_identifier = ''
273 
274 # A unique identification for the text.
275 #
276 # epub_uid = ''
277 
278 # A list of files that should not be packed into the epub file.
279 epub_exclude_files = ['search.html']
280 
281 
282 # -- Extension configuration -------------------------------------------------
283 
284 # Tell sphinx-autodoc-typehints to generate stub parameter annotations including
285 # types, even if the parameters aren't explicitly documented.
286 always_document_param_types = True
287 
288 
289 # Remove auto-generated API docs from sidebars. They take too long to build.
290 remove_from_toctrees = ["_autosummary/*"]
291
```
--- 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
@@ -70,6 +70,7 @@
     'sphinx_autodoc_typehints',
     'myst_nb',
     "sphinx_remove_toctrees",
+    'sphinx_copybutton',
     'jax_extensions',
 ]

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -70,6 +70,7 @@\n     'sphinx_autodoc_typehints',\n     'myst_nb',\n     \"sphinx_remove_toctrees\",\n+    'sphinx_copybutton',\n     'jax_extensions',\n ]\n", "issue": "[QoL] Add copy button in docs code snippets\nSince I'm a bit lazy, I'd like to have a \"copy to clipboard\" button in jax docs to copy over code snippets instead of drag-select-copying it.  Like this:\r\n\r\n![image](https://user-images.githubusercontent.com/56438982/155105866-317c1ca8-5c1e-4809-be2a-2cf3a3145d23.png)\r\n\r\nDupicate Checks:\r\nNothing relevant comes up when searching for \"copy button\", \"docs copy button\" or even \"button\" for that matter.\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\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 = '2020, 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.\nsys.path.append(os.path.abspath('sphinxext'))\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    'matplotlib.sphinxext.plot_directive',\n    'sphinx_autodoc_typehints',\n    'myst_nb',\n    \"sphinx_remove_toctrees\",\n    'jax_extensions',\n]\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'numpy': ('https://numpy.org/doc/stable/', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy-1.8.0/html-scipyorg/', None),\n}\n\nsuppress_warnings = [\n    'ref.citation',  # Many duplicated citations in numpy/scipy docstrings.\n    'ref.footnote',  # Many unreferenced footnotes in numpy/scipy docstrings\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# Note: important to list ipynb before md here: we have both md and ipynb\n# copies of each notebook, and myst will choose which to convert based on\n# the order in the source_suffix list. Notebooks which are not executed have\n# outputs stored in ipynb but not in md, so we must convert the ipynb.\nsource_suffix = ['.rst', '.ipynb', '.md']\n\n# The main toctree document.\nmain_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    # Sometimes sphinx reads its own outputs as inputs!\n    'build/html',\n    'build/jupyter_execute',\n    'notebooks/README.md',\n    'README.md',\n    # Ignore markdown source for notebooks; myst-nb builds from the ipynb\n    # These are kept in sync using the jupytext pre-commit hook.\n    'notebooks/*.md',\n    'design_notes/type_promotion.md',\n    # TODO: revert to jax-101/*.md once 08-pjit has a notebook\n    'jax-101/01-jax-basics.md',\n    'jax-101/02-jitting.md',\n    'jax-101/03-vectorization.md',\n    'jax-101/04-advanced-autodiff.md',\n    'jax-101/05-random-numbers.md',\n    'jax-101/05.1-pytrees.md',\n    'jax-101/06-parallelism.md',\n    'jax-101/07-state.md',\n    'autodidax.md',\n    # Attempt to fix RTD build failure\n    'transformations.md',\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# 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_book_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    'show_toc_level': 2,\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\nhtml_favicon = '_static/favicon.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# -- Options for myst ----------------------------------------------\njupyter_execute_notebooks = \"force\"\nexecution_allow_errors = False\nexecution_fail_on_error = True  # Requires https://github.com/executablebooks/MyST-NB/pull/296\n\n# Notebook cell execution timeout; defaults to 30.\nexecution_timeout = 100\n\n# List of patterns, relative to source directory, that match notebook\n# files that will not be executed.\nexecution_excludepatterns = [\n    # Slow notebook: long time to load tf.ds\n    'notebooks/neural_network_with_tfds_data.*',\n    # Slow notebook\n    'notebooks/Neural_Network_and_Data_Loading.*',\n    # Strange error apparently due to asynchronous cell execution\n    'notebooks/thinking_in_jax.*',\n    # TODO(jakevdp): enable execution on these\n    'design_notes/type_promotion.*',\n    'jax-101/*',\n    'notebooks/xmap_tutorial.*',\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    (main_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    (main_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    (main_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\n\n# Remove auto-generated API docs from sidebars. They take too long to build.\nremove_from_toctrees = [\"_autosummary/*\"]\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 = '2020, 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.\nsys.path.append(os.path.abspath('sphinxext'))\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    'matplotlib.sphinxext.plot_directive',\n    'sphinx_autodoc_typehints',\n    'myst_nb',\n    \"sphinx_remove_toctrees\",\n    'sphinx_copybutton',\n    'jax_extensions',\n]\n\nintersphinx_mapping = {\n    'python': ('https://docs.python.org/3/', None),\n    'numpy': ('https://numpy.org/doc/stable/', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy-1.8.0/html-scipyorg/', None),\n}\n\nsuppress_warnings = [\n    'ref.citation',  # Many duplicated citations in numpy/scipy docstrings.\n    'ref.footnote',  # Many unreferenced footnotes in numpy/scipy docstrings\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# Note: important to list ipynb before md here: we have both md and ipynb\n# copies of each notebook, and myst will choose which to convert based on\n# the order in the source_suffix list. Notebooks which are not executed have\n# outputs stored in ipynb but not in md, so we must convert the ipynb.\nsource_suffix = ['.rst', '.ipynb', '.md']\n\n# The main toctree document.\nmain_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    # Sometimes sphinx reads its own outputs as inputs!\n    'build/html',\n    'build/jupyter_execute',\n    'notebooks/README.md',\n    'README.md',\n    # Ignore markdown source for notebooks; myst-nb builds from the ipynb\n    # These are kept in sync using the jupytext pre-commit hook.\n    'notebooks/*.md',\n    'design_notes/type_promotion.md',\n    # TODO: revert to jax-101/*.md once 08-pjit has a notebook\n    'jax-101/01-jax-basics.md',\n    'jax-101/02-jitting.md',\n    'jax-101/03-vectorization.md',\n    'jax-101/04-advanced-autodiff.md',\n    'jax-101/05-random-numbers.md',\n    'jax-101/05.1-pytrees.md',\n    'jax-101/06-parallelism.md',\n    'jax-101/07-state.md',\n    'autodidax.md',\n    # Attempt to fix RTD build failure\n    'transformations.md',\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# 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_book_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    'show_toc_level': 2,\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\nhtml_favicon = '_static/favicon.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# -- Options for myst ----------------------------------------------\njupyter_execute_notebooks = \"force\"\nexecution_allow_errors = False\nexecution_fail_on_error = True  # Requires https://github.com/executablebooks/MyST-NB/pull/296\n\n# Notebook cell execution timeout; defaults to 30.\nexecution_timeout = 100\n\n# List of patterns, relative to source directory, that match notebook\n# files that will not be executed.\nexecution_excludepatterns = [\n    # Slow notebook: long time to load tf.ds\n    'notebooks/neural_network_with_tfds_data.*',\n    # Slow notebook\n    'notebooks/Neural_Network_and_Data_Loading.*',\n    # Strange error apparently due to asynchronous cell execution\n    'notebooks/thinking_in_jax.*',\n    # TODO(jakevdp): enable execution on these\n    'design_notes/type_promotion.*',\n    'jax-101/*',\n    'notebooks/xmap_tutorial.*',\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    (main_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    (main_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    (main_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\n\n# Remove auto-generated API docs from sidebars. They take too long to build.\nremove_from_toctrees = [\"_autosummary/*\"]\n", "path": "docs/conf.py"}]}