Skip to content

Commit

Permalink
Make docs fast by removing elegant_typehints (scverse#2199)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirshup authored Apr 1, 2022
1 parent 034ca28 commit 771f43d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from datetime import datetime

import matplotlib # noqa
from packaging.version import parse as parse_version

# Don’t use tkinter agg when importing scanpy → … → matplotlib
matplotlib.use('agg')
Expand All @@ -29,6 +30,12 @@
author = 'Scanpy development team'
copyright = f'{datetime.now():%Y}, the Scanpy development team.'
version = scanpy.__version__.replace('.dirty', '')

# Bumping the version updates all docs, so don't do that
if parse_version(version).is_devrelease:
parsed = parse_version(version)
version = f"{parsed.major}.{parsed.minor}.{parsed.micro}.dev"

release = version

# default settings
Expand All @@ -52,7 +59,11 @@
'sphinx_autodoc_typehints', # needs to be after napoleon
# 'ipython_directive',
# 'ipython_console_highlighting',
'scanpydoc',
# 'scanpydoc', # scanpydoc.elegant_typehints causes full doc rebuilds
'scanpydoc.rtd_github_links',
'scanpydoc.theme',
'scanpydoc.definition_list_typed_field',
'scanpydoc.autosummary_generate_imported',
*[p.stem for p in (HERE / 'extensions').glob('*.py')],
]

Expand All @@ -69,6 +80,8 @@
todo_include_todos = False
api_dir = HERE / 'api' # function_images

typehints_defaults = 'braces'

scanpy_tutorials_url = 'https://scanpy-tutorials.readthedocs.io/en/latest/'

intersphinx_mapping = dict(
Expand Down

0 comments on commit 771f43d

Please sign in to comment.