We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sphinx 4.1.0 doesn't like ScanpyConfig
Update:

Docs don't build with sphinx 4.1.0 due to a error triggered by `scanpydoc`. Sphinx will be pinned until this is solved (which is when this issue should be closed). It's not obvious to me at the moment whether sphinx or scanpydoc is at fault.

---------------

Trying to build the docs with Sphinx 4.1.0 fails with the following output:

<details>
<summary> </summary>

```sh
$ make html
Running Sphinx v4.1.0
loading intersphinx inventory from https://anndata.readthedocs.io/en/stable/objects.inv...
loading intersphinx inventory from https://bbknn.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/cycler/objects.inv...
loading intersphinx inventory from http://docs.h5py.org/en/stable/objects.inv...
loading intersphinx inventory from https://ipython.readthedocs.io/en/stable/objects.inv...
loading intersphinx inventory from https://leidenalg.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://louvain-igraph.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/objects.inv...
loading intersphinx inventory from https://networkx.github.io/documentation/networkx-1.10/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/numpy/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://docs.pytest.org/en/latest/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv...
loading intersphinx inventory from https://seaborn.pydata.org/objects.inv...
loading intersphinx inventory from https://scikit-learn.org/stable/objects.inv...
loading intersphinx inventory from https://scanpy-tutorials.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://networkx.github.io/documentation/networkx-1.10/objects.inv -> https://networkx.org/documentation/networkx-1.10/objects.inv
intersphinx inventory has moved: https://docs.scipy.org/doc/numpy/objects.inv -> https://numpy.org/doc/stable/objects.inv
intersphinx inventory has moved: http://docs.h5py.org/en/stable/objects.inv -> https://docs.h5py.org/en/stable/objects.inv
[autosummary] generating autosummary for: _key_contributors.rst, api.rst, basic_usage.rst, community.rst, contributors.rst, dev/ci.rst, dev/code.rst, dev/documentation.rst, dev/external-tools.rst, dev/getting-set-up.rst, ..., release-notes/1.7.1.rst, release-notes/1.7.2.rst, release-notes/1.8.0.rst, release-notes/1.8.1.rst, release-notes/1.8.2.rst, release-notes/1.9.0.rst, release-notes/index.rst, release-notes/release-latest.rst, tutorials.rst, usage-principles.rst
Error in github_url('scanpy._settings.ScanpyConfig.N_PCS'):

Extension error (sphinx.ext.autosummary):
Handler <function process_generate_options at 0x139c4a940> for event 'builder-inited' threw an exception (exception: type object 'ScanpyConfig' has no attribute 'N_PCS')
make: *** [html] Error 2
```

</details>

However, I'm entirely sure if this is Sphinx's fault, or our own. Currently the [N_PCS parameter isn't in the rendered documentation](https://scanpy.readthedocs.io/en/stable/generated/scanpy._settings.ScanpyConfig.html#scanpy._settings.ScanpyConfig). I think it should be, and am not sure why it's not showing up here.

To summarize:

* Previous versions of our doc builds didn't seem to be including attribute docstrings for `ScanpyConfig`.
* Sphinx 4.1.0 raises an error when it hits this attribute

--- 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 import os
2 import sys
3 from pathlib import Path
4 from datetime import datetime
5 
6 import matplotlib  # noqa
7 
8 # Don’t use tkinter agg when importing scanpy → … → matplotlib
9 matplotlib.use('agg')
10 
11 HERE = Path(__file__).parent
12 sys.path[:0] = [str(HERE.parent), str(HERE / 'extensions')]
13 import scanpy  # noqa
14 
15 on_rtd = os.environ.get('READTHEDOCS') == 'True'
16 
17 # -- General configuration ------------------------------------------------
18 
19 
20 nitpicky = True  # Warn about broken links. This is here for a reason: Do not change.
21 needs_sphinx = '2.0'  # Nicer param docs
22 suppress_warnings = ['ref.citation']
23 
24 # General information
25 project = 'Scanpy'
26 author = scanpy.__author__
27 copyright = f'{datetime.now():%Y}, {author}.'
28 version = scanpy.__version__.replace('.dirty', '')
29 release = version
30 
31 # default settings
32 templates_path = ['_templates']
33 source_suffix = '.rst'
34 master_doc = 'index'
35 default_role = 'literal'
36 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
37 pygments_style = 'sphinx'
38 
39 extensions = [
40     'sphinx.ext.autodoc',
41     'sphinx.ext.intersphinx',
42     'sphinx.ext.doctest',
43     'sphinx.ext.coverage',
44     'sphinx.ext.mathjax',
45     'sphinx.ext.napoleon',
46     'sphinx.ext.autosummary',
47     # 'plot_generator',
48     'matplotlib.sphinxext.plot_directive',
49     'sphinx_autodoc_typehints',  # needs to be after napoleon
50     # 'ipython_directive',
51     # 'ipython_console_highlighting',
52     'scanpydoc',
53     *[p.stem for p in (HERE / 'extensions').glob('*.py')],
54 ]
55 
56 # Generate the API documentation when building
57 autosummary_generate = True
58 autodoc_member_order = 'bysource'
59 # autodoc_default_flags = ['members']
60 napoleon_google_docstring = False
61 napoleon_numpy_docstring = True
62 napoleon_include_init_with_doc = False
63 napoleon_use_rtype = True  # having a separate entry generally helps readability
64 napoleon_use_param = True
65 napoleon_custom_sections = [('Params', 'Parameters')]
66 todo_include_todos = False
67 api_dir = HERE / 'api'  # function_images
68 
69 scanpy_tutorials_url = 'https://scanpy-tutorials.readthedocs.io/en/latest/'
70 
71 intersphinx_mapping = dict(
72     anndata=('https://anndata.readthedocs.io/en/stable/', None),
73     bbknn=('https://bbknn.readthedocs.io/en/latest/', None),
74     cycler=('https://matplotlib.org/cycler/', None),
75     h5py=('http://docs.h5py.org/en/stable/', None),
76     ipython=('https://ipython.readthedocs.io/en/stable/', None),
77     leidenalg=('https://leidenalg.readthedocs.io/en/latest/', None),
78     louvain=('https://louvain-igraph.readthedocs.io/en/latest/', None),
79     matplotlib=('https://matplotlib.org/', None),
80     networkx=('https://networkx.github.io/documentation/networkx-1.10/', None),
81     numpy=('https://docs.scipy.org/doc/numpy/', None),
82     pandas=('https://pandas.pydata.org/pandas-docs/stable/', None),
83     pytest=('https://docs.pytest.org/en/latest/', None),
84     python=('https://docs.python.org/3', None),
85     scipy=('https://docs.scipy.org/doc/scipy/reference/', None),
86     seaborn=('https://seaborn.pydata.org/', None),
87     sklearn=('https://scikit-learn.org/stable/', None),
88     scanpy_tutorials=(scanpy_tutorials_url, None),
89 )
90 
91 
92 # -- Options for HTML output ----------------------------------------------
93 
94 
95 html_theme = 'scanpydoc'
96 html_theme_options = dict(
97     navigation_depth=4,
98     logo_only=True,
99     docsearch_index='scanpy',
100     docsearch_key='fa4304eb95d2134997e3729553a674b2',
101 )
102 html_context = dict(
103     display_github=True,  # Integrate GitHub
104     github_user='theislab',  # Username
105     github_repo='scanpy',  # Repo name
106     github_version='master',  # Version
107     conf_py_path='/docs/',  # Path in the checkout to the docs root
108 )
109 html_static_path = ['_static']
110 html_show_sphinx = False
111 html_logo = '_static/img/Scanpy_Logo_BrightFG.svg'
112 
113 
114 def setup(app):
115     app.warningiserror = on_rtd
116 
117 
118 # -- Options for other output formats ------------------------------------------
119 
120 htmlhelp_basename = f'{project}doc'
121 doc_title = f'{project} Documentation'
122 latex_documents = [(master_doc, f'{project}.tex', doc_title, author, 'manual')]
123 man_pages = [(master_doc, project, doc_title, [author], 1)]
124 texinfo_documents = [
125     (
126         master_doc,
127         project,
128         doc_title,
129         author,
130         project,
131         'One line description of project.',
132         'Miscellaneous',
133     )
134 ]
135 
136 
137 # -- Suppress link warnings ----------------------------------------------------
138 
139 qualname_overrides = {
140     "sklearn.neighbors._dist_metrics.DistanceMetric": "sklearn.neighbors.DistanceMetric",
141     # If the docs are built with an old version of numpy, this will make it work:
142     "numpy.random.RandomState": "numpy.random.mtrand.RandomState",
143     "scanpy.plotting._matrixplot.MatrixPlot": "scanpy.pl.MatrixPlot",
144     "scanpy.plotting._dotplot.DotPlot": "scanpy.pl.DotPlot",
145     "scanpy.plotting._stacked_violin.StackedViolin": "scanpy.pl.StackedViolin",
146     "pandas.core.series.Series": "pandas.Series",
147 }
148 
149 nitpick_ignore = [
150     # Will probably be documented
151     ('py:class', 'scanpy._settings.Verbosity'),
152     # Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810
153     ('py:class', 'seaborn.ClusterGrid'),
154     # Won’t be documented
155     ('py:class', 'scanpy.plotting._utils._AxesSubplot'),
156     ('py:class', 'scanpy._utils.Empty'),
157     ('py:class', 'numpy.random.mtrand.RandomState'),
158 ]
159 
160 # Options for plot examples
161 
162 plot_include_source = True
163 plot_formats = [("png", 90)]
164 plot_html_show_formats = False
165 plot_html_show_source_link = False
166 plot_working_directory = HERE.parent  # Project root
167
```
--- 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
@@ -155,6 +155,9 @@
     ('py:class', 'scanpy.plotting._utils._AxesSubplot'),
     ('py:class', 'scanpy._utils.Empty'),
     ('py:class', 'numpy.random.mtrand.RandomState'),
+    # Will work once scipy 1.8 is released
+    ('py:class', 'scipy.sparse.base.spmatrix'),
+    ('py:class', 'scipy.sparse.csr.csr_matrix'),
 ]
 
 # Options for plot examples

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -155,6 +155,9 @@\n     ('py:class', 'scanpy.plotting._utils._AxesSubplot'),\n     ('py:class', 'scanpy._utils.Empty'),\n     ('py:class', 'numpy.random.mtrand.RandomState'),\n+    # Will work once scipy 1.8 is released\n+    ('py:class', 'scipy.sparse.base.spmatrix'),\n+    ('py:class', 'scipy.sparse.csr.csr_matrix'),\n ]\n \n # Options for plot examples\n", "issue": "Sphinx 4.1.0 doesn't like ScanpyConfig\nUpdate:\r\n\r\nDocs don't build with sphinx 4.1.0 due to a error triggered by `scanpydoc`. Sphinx will be pinned until this is solved (which is when this issue should be closed). It's not obvious to me at the moment whether sphinx or scanpydoc is at fault.\r\n\r\n---------------\r\n\r\nTrying to build the docs with Sphinx 4.1.0 fails with the following output:\r\n\r\n<details>\r\n<summary> </summary>\r\n\r\n```sh\r\n$ make html\r\nRunning Sphinx v4.1.0\r\nloading intersphinx inventory from https://anndata.readthedocs.io/en/stable/objects.inv...\r\nloading intersphinx inventory from https://bbknn.readthedocs.io/en/latest/objects.inv...\r\nloading intersphinx inventory from https://matplotlib.org/cycler/objects.inv...\r\nloading intersphinx inventory from http://docs.h5py.org/en/stable/objects.inv...\r\nloading intersphinx inventory from https://ipython.readthedocs.io/en/stable/objects.inv...\r\nloading intersphinx inventory from https://leidenalg.readthedocs.io/en/latest/objects.inv...\r\nloading intersphinx inventory from https://louvain-igraph.readthedocs.io/en/latest/objects.inv...\r\nloading intersphinx inventory from https://matplotlib.org/objects.inv...\r\nloading intersphinx inventory from https://networkx.github.io/documentation/networkx-1.10/objects.inv...\r\nloading intersphinx inventory from https://docs.scipy.org/doc/numpy/objects.inv...\r\nloading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...\r\nloading intersphinx inventory from https://docs.pytest.org/en/latest/objects.inv...\r\nloading intersphinx inventory from https://docs.python.org/3/objects.inv...\r\nloading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv...\r\nloading intersphinx inventory from https://seaborn.pydata.org/objects.inv...\r\nloading intersphinx inventory from https://scikit-learn.org/stable/objects.inv...\r\nloading intersphinx inventory from https://scanpy-tutorials.readthedocs.io/en/latest/objects.inv...\r\nintersphinx inventory has moved: https://networkx.github.io/documentation/networkx-1.10/objects.inv -> https://networkx.org/documentation/networkx-1.10/objects.inv\r\nintersphinx inventory has moved: https://docs.scipy.org/doc/numpy/objects.inv -> https://numpy.org/doc/stable/objects.inv\r\nintersphinx inventory has moved: http://docs.h5py.org/en/stable/objects.inv -> https://docs.h5py.org/en/stable/objects.inv\r\n[autosummary] generating autosummary for: _key_contributors.rst, api.rst, basic_usage.rst, community.rst, contributors.rst, dev/ci.rst, dev/code.rst, dev/documentation.rst, dev/external-tools.rst, dev/getting-set-up.rst, ..., release-notes/1.7.1.rst, release-notes/1.7.2.rst, release-notes/1.8.0.rst, release-notes/1.8.1.rst, release-notes/1.8.2.rst, release-notes/1.9.0.rst, release-notes/index.rst, release-notes/release-latest.rst, tutorials.rst, usage-principles.rst\r\nError in github_url('scanpy._settings.ScanpyConfig.N_PCS'):\r\n\r\nExtension error (sphinx.ext.autosummary):\r\nHandler <function process_generate_options at 0x139c4a940> for event 'builder-inited' threw an exception (exception: type object 'ScanpyConfig' has no attribute 'N_PCS')\r\nmake: *** [html] Error 2\r\n```\r\n\r\n</details>\r\n\r\nHowever, I'm entirely sure if this is Sphinx's fault, or our own. Currently the [N_PCS parameter isn't in the rendered documentation](https://scanpy.readthedocs.io/en/stable/generated/scanpy._settings.ScanpyConfig.html#scanpy._settings.ScanpyConfig). I think it should be, and am not sure why it's not showing up here.\r\n\r\nTo summarize:\r\n\r\n* Previous versions of our doc builds didn't seem to be including attribute docstrings for `ScanpyConfig`.\r\n* Sphinx 4.1.0 raises an error when it hits this attribute\n", "before_files": [{"content": "import os\nimport sys\nfrom pathlib import Path\nfrom datetime import datetime\n\nimport matplotlib  # noqa\n\n# Don\u2019t use tkinter agg when importing scanpy \u2192 \u2026 \u2192 matplotlib\nmatplotlib.use('agg')\n\nHERE = Path(__file__).parent\nsys.path[:0] = [str(HERE.parent), str(HERE / 'extensions')]\nimport scanpy  # noqa\n\non_rtd = os.environ.get('READTHEDOCS') == 'True'\n\n# -- General configuration ------------------------------------------------\n\n\nnitpicky = True  # Warn about broken links. This is here for a reason: Do not change.\nneeds_sphinx = '2.0'  # Nicer param docs\nsuppress_warnings = ['ref.citation']\n\n# General information\nproject = 'Scanpy'\nauthor = scanpy.__author__\ncopyright = f'{datetime.now():%Y}, {author}.'\nversion = scanpy.__version__.replace('.dirty', '')\nrelease = version\n\n# default settings\ntemplates_path = ['_templates']\nsource_suffix = '.rst'\nmaster_doc = 'index'\ndefault_role = 'literal'\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\npygments_style = 'sphinx'\n\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.doctest',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.autosummary',\n    # 'plot_generator',\n    'matplotlib.sphinxext.plot_directive',\n    'sphinx_autodoc_typehints',  # needs to be after napoleon\n    # 'ipython_directive',\n    # 'ipython_console_highlighting',\n    'scanpydoc',\n    *[p.stem for p in (HERE / 'extensions').glob('*.py')],\n]\n\n# Generate the API documentation when building\nautosummary_generate = True\nautodoc_member_order = 'bysource'\n# autodoc_default_flags = ['members']\nnapoleon_google_docstring = False\nnapoleon_numpy_docstring = True\nnapoleon_include_init_with_doc = False\nnapoleon_use_rtype = True  # having a separate entry generally helps readability\nnapoleon_use_param = True\nnapoleon_custom_sections = [('Params', 'Parameters')]\ntodo_include_todos = False\napi_dir = HERE / 'api'  # function_images\n\nscanpy_tutorials_url = 'https://scanpy-tutorials.readthedocs.io/en/latest/'\n\nintersphinx_mapping = dict(\n    anndata=('https://anndata.readthedocs.io/en/stable/', None),\n    bbknn=('https://bbknn.readthedocs.io/en/latest/', None),\n    cycler=('https://matplotlib.org/cycler/', None),\n    h5py=('http://docs.h5py.org/en/stable/', None),\n    ipython=('https://ipython.readthedocs.io/en/stable/', None),\n    leidenalg=('https://leidenalg.readthedocs.io/en/latest/', None),\n    louvain=('https://louvain-igraph.readthedocs.io/en/latest/', None),\n    matplotlib=('https://matplotlib.org/', None),\n    networkx=('https://networkx.github.io/documentation/networkx-1.10/', None),\n    numpy=('https://docs.scipy.org/doc/numpy/', None),\n    pandas=('https://pandas.pydata.org/pandas-docs/stable/', None),\n    pytest=('https://docs.pytest.org/en/latest/', None),\n    python=('https://docs.python.org/3', None),\n    scipy=('https://docs.scipy.org/doc/scipy/reference/', None),\n    seaborn=('https://seaborn.pydata.org/', None),\n    sklearn=('https://scikit-learn.org/stable/', None),\n    scanpy_tutorials=(scanpy_tutorials_url, None),\n)\n\n\n# -- Options for HTML output ----------------------------------------------\n\n\nhtml_theme = 'scanpydoc'\nhtml_theme_options = dict(\n    navigation_depth=4,\n    logo_only=True,\n    docsearch_index='scanpy',\n    docsearch_key='fa4304eb95d2134997e3729553a674b2',\n)\nhtml_context = dict(\n    display_github=True,  # Integrate GitHub\n    github_user='theislab',  # Username\n    github_repo='scanpy',  # Repo name\n    github_version='master',  # Version\n    conf_py_path='/docs/',  # Path in the checkout to the docs root\n)\nhtml_static_path = ['_static']\nhtml_show_sphinx = False\nhtml_logo = '_static/img/Scanpy_Logo_BrightFG.svg'\n\n\ndef setup(app):\n    app.warningiserror = on_rtd\n\n\n# -- Options for other output formats ------------------------------------------\n\nhtmlhelp_basename = f'{project}doc'\ndoc_title = f'{project} Documentation'\nlatex_documents = [(master_doc, f'{project}.tex', doc_title, author, 'manual')]\nman_pages = [(master_doc, project, doc_title, [author], 1)]\ntexinfo_documents = [\n    (\n        master_doc,\n        project,\n        doc_title,\n        author,\n        project,\n        'One line description of project.',\n        'Miscellaneous',\n    )\n]\n\n\n# -- Suppress link warnings ----------------------------------------------------\n\nqualname_overrides = {\n    \"sklearn.neighbors._dist_metrics.DistanceMetric\": \"sklearn.neighbors.DistanceMetric\",\n    # If the docs are built with an old version of numpy, this will make it work:\n    \"numpy.random.RandomState\": \"numpy.random.mtrand.RandomState\",\n    \"scanpy.plotting._matrixplot.MatrixPlot\": \"scanpy.pl.MatrixPlot\",\n    \"scanpy.plotting._dotplot.DotPlot\": \"scanpy.pl.DotPlot\",\n    \"scanpy.plotting._stacked_violin.StackedViolin\": \"scanpy.pl.StackedViolin\",\n    \"pandas.core.series.Series\": \"pandas.Series\",\n}\n\nnitpick_ignore = [\n    # Will probably be documented\n    ('py:class', 'scanpy._settings.Verbosity'),\n    # Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810\n    ('py:class', 'seaborn.ClusterGrid'),\n    # Won\u2019t be documented\n    ('py:class', 'scanpy.plotting._utils._AxesSubplot'),\n    ('py:class', 'scanpy._utils.Empty'),\n    ('py:class', 'numpy.random.mtrand.RandomState'),\n]\n\n# Options for plot examples\n\nplot_include_source = True\nplot_formats = [(\"png\", 90)]\nplot_html_show_formats = False\nplot_html_show_source_link = False\nplot_working_directory = HERE.parent  # Project root\n", "path": "docs/conf.py"}], "after_files": [{"content": "import os\nimport sys\nfrom pathlib import Path\nfrom datetime import datetime\n\nimport matplotlib  # noqa\n\n# Don\u2019t use tkinter agg when importing scanpy \u2192 \u2026 \u2192 matplotlib\nmatplotlib.use('agg')\n\nHERE = Path(__file__).parent\nsys.path[:0] = [str(HERE.parent), str(HERE / 'extensions')]\nimport scanpy  # noqa\n\non_rtd = os.environ.get('READTHEDOCS') == 'True'\n\n# -- General configuration ------------------------------------------------\n\n\nnitpicky = True  # Warn about broken links. This is here for a reason: Do not change.\nneeds_sphinx = '2.0'  # Nicer param docs\nsuppress_warnings = ['ref.citation']\n\n# General information\nproject = 'Scanpy'\nauthor = scanpy.__author__\ncopyright = f'{datetime.now():%Y}, {author}.'\nversion = scanpy.__version__.replace('.dirty', '')\nrelease = version\n\n# default settings\ntemplates_path = ['_templates']\nsource_suffix = '.rst'\nmaster_doc = 'index'\ndefault_role = 'literal'\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\npygments_style = 'sphinx'\n\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.intersphinx',\n    'sphinx.ext.doctest',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.autosummary',\n    # 'plot_generator',\n    'matplotlib.sphinxext.plot_directive',\n    'sphinx_autodoc_typehints',  # needs to be after napoleon\n    # 'ipython_directive',\n    # 'ipython_console_highlighting',\n    'scanpydoc',\n    *[p.stem for p in (HERE / 'extensions').glob('*.py')],\n]\n\n# Generate the API documentation when building\nautosummary_generate = True\nautodoc_member_order = 'bysource'\n# autodoc_default_flags = ['members']\nnapoleon_google_docstring = False\nnapoleon_numpy_docstring = True\nnapoleon_include_init_with_doc = False\nnapoleon_use_rtype = True  # having a separate entry generally helps readability\nnapoleon_use_param = True\nnapoleon_custom_sections = [('Params', 'Parameters')]\ntodo_include_todos = False\napi_dir = HERE / 'api'  # function_images\n\nscanpy_tutorials_url = 'https://scanpy-tutorials.readthedocs.io/en/latest/'\n\nintersphinx_mapping = dict(\n    anndata=('https://anndata.readthedocs.io/en/stable/', None),\n    bbknn=('https://bbknn.readthedocs.io/en/latest/', None),\n    cycler=('https://matplotlib.org/cycler/', None),\n    h5py=('http://docs.h5py.org/en/stable/', None),\n    ipython=('https://ipython.readthedocs.io/en/stable/', None),\n    leidenalg=('https://leidenalg.readthedocs.io/en/latest/', None),\n    louvain=('https://louvain-igraph.readthedocs.io/en/latest/', None),\n    matplotlib=('https://matplotlib.org/', None),\n    networkx=('https://networkx.github.io/documentation/networkx-1.10/', None),\n    numpy=('https://docs.scipy.org/doc/numpy/', None),\n    pandas=('https://pandas.pydata.org/pandas-docs/stable/', None),\n    pytest=('https://docs.pytest.org/en/latest/', None),\n    python=('https://docs.python.org/3', None),\n    scipy=('https://docs.scipy.org/doc/scipy/reference/', None),\n    seaborn=('https://seaborn.pydata.org/', None),\n    sklearn=('https://scikit-learn.org/stable/', None),\n    scanpy_tutorials=(scanpy_tutorials_url, None),\n)\n\n\n# -- Options for HTML output ----------------------------------------------\n\n\nhtml_theme = 'scanpydoc'\nhtml_theme_options = dict(\n    navigation_depth=4,\n    logo_only=True,\n    docsearch_index='scanpy',\n    docsearch_key='fa4304eb95d2134997e3729553a674b2',\n)\nhtml_context = dict(\n    display_github=True,  # Integrate GitHub\n    github_user='theislab',  # Username\n    github_repo='scanpy',  # Repo name\n    github_version='master',  # Version\n    conf_py_path='/docs/',  # Path in the checkout to the docs root\n)\nhtml_static_path = ['_static']\nhtml_show_sphinx = False\nhtml_logo = '_static/img/Scanpy_Logo_BrightFG.svg'\n\n\ndef setup(app):\n    app.warningiserror = on_rtd\n\n\n# -- Options for other output formats ------------------------------------------\n\nhtmlhelp_basename = f'{project}doc'\ndoc_title = f'{project} Documentation'\nlatex_documents = [(master_doc, f'{project}.tex', doc_title, author, 'manual')]\nman_pages = [(master_doc, project, doc_title, [author], 1)]\ntexinfo_documents = [\n    (\n        master_doc,\n        project,\n        doc_title,\n        author,\n        project,\n        'One line description of project.',\n        'Miscellaneous',\n    )\n]\n\n\n# -- Suppress link warnings ----------------------------------------------------\n\nqualname_overrides = {\n    \"sklearn.neighbors._dist_metrics.DistanceMetric\": \"sklearn.neighbors.DistanceMetric\",\n    # If the docs are built with an old version of numpy, this will make it work:\n    \"numpy.random.RandomState\": \"numpy.random.mtrand.RandomState\",\n    \"scanpy.plotting._matrixplot.MatrixPlot\": \"scanpy.pl.MatrixPlot\",\n    \"scanpy.plotting._dotplot.DotPlot\": \"scanpy.pl.DotPlot\",\n    \"scanpy.plotting._stacked_violin.StackedViolin\": \"scanpy.pl.StackedViolin\",\n    \"pandas.core.series.Series\": \"pandas.Series\",\n}\n\nnitpick_ignore = [\n    # Will probably be documented\n    ('py:class', 'scanpy._settings.Verbosity'),\n    # Currently undocumented: https://github.com/mwaskom/seaborn/issues/1810\n    ('py:class', 'seaborn.ClusterGrid'),\n    # Won\u2019t be documented\n    ('py:class', 'scanpy.plotting._utils._AxesSubplot'),\n    ('py:class', 'scanpy._utils.Empty'),\n    ('py:class', 'numpy.random.mtrand.RandomState'),\n    # Will work once scipy 1.8 is released\n    ('py:class', 'scipy.sparse.base.spmatrix'),\n    ('py:class', 'scipy.sparse.csr.csr_matrix'),\n]\n\n# Options for plot examples\n\nplot_include_source = True\nplot_formats = [(\"png\", 90)]\nplot_html_show_formats = False\nplot_html_show_source_link = False\nplot_working_directory = HERE.parent  # Project root\n", "path": "docs/conf.py"}]}