1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# tifffile/docs/conf.py
import os
import sys
here = os.path.dirname(__file__)
sys.path.insert(0, os.path.split(here)[0])
import tifffile
project = 'tifffile'
copyright = '2008-2026, Christoph Gohlke'
author = 'Christoph Gohlke'
version = tifffile.__version__
extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
# 'sphinxcontrib.spelling',
# 'sphinx.ext.viewcode',
# 'sphinx.ext.autosectionlabel',
# 'numpydoc',
# 'sphinx_issues',
]
templates_path = ['_templates']
html_theme = 'alabaster'
html_static_path = ['_static']
html_css_files = ['custom.css']
html_show_sourcelink = False
autodoc_member_order = 'bysource' # bysource, groupwise
autodoc_default_flags = ['members']
autodoc_typehints = 'description'
autodoc_type_aliases = {'ArrayLike': 'numpy.ArrayLike'}
autoclass_content = 'class'
autosectionlabel_prefix_document = True
autosummary_generate = True
napoleon_google_docstring = True
napoleon_numpy_docstring = False
html_theme_options = {
'nosidebar': False,
}
def add_api(app, what, name, obj, options, lines):
if what == 'module':
lines.extend(('API', '---'))
def setup(app):
pass
# app.connect('autodoc-process-docstring', add_api)
# mypy: allow-untyped-defs, allow-untyped-calls
|