Skip to content

Commit f0728fc

Browse files
committed
Update documentation
1 parent e910fb7 commit f0728fc

1 file changed

Lines changed: 28 additions & 24 deletions

File tree

docs/source/conf.py

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,37 @@
99
import os
1010
import sys
1111

12-
sys.path.insert(0, os.path.abspath('../..'))
12+
sys.path.insert(0, os.path.abspath("../.."))
1313
sys.path.insert(0, os.path.abspath("sphinxext"))
1414

1515

1616
# -- Project information -----------------------------------------------------
1717

18-
project = 'stabilized-ica'
19-
copyright = 'Copyright 2022, Nicolas Captier (built with a theme provided by the scikit-learn developers (BSD License))'
20-
author = 'Nicolas Captier'
21-
release = '2.0.0'
18+
project = "stabilized-ica"
19+
copyright = "Copyright 2022, Nicolas Captier (built with a theme provided by the scikit-learn developers (BSD License))"
20+
author = "Nicolas Captier"
21+
release = "2.0.0"
2222

2323
# -- General configuration ---------------------------------------------------
2424

2525
# Add any Sphinx extension module names here, as strings. They can be
2626
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2727
# ones.
28-
extensions = ['sphinx.ext.autodoc',
29-
'sphinx.ext.autosummary',
30-
'sphinx.ext.coverage',
31-
'numpydoc',
32-
'sphinx.ext.linkcode',
33-
'sphinx.ext.autosectionlabel',
34-
'sphinx_gallery.load_style',
35-
'nbsphinx',
36-
'add_toctree_functions']
28+
extensions = [
29+
"sphinx.ext.autodoc",
30+
"sphinx.ext.autosummary",
31+
"sphinx.ext.coverage",
32+
"numpydoc",
33+
"sphinx.ext.linkcode",
34+
"sphinx.ext.autosectionlabel",
35+
"sphinx_gallery.load_style",
36+
"nbsphinx",
37+
"add_toctree_functions",
38+
]
39+
40+
autodoc_typehints = "none"
3741

42+
autodoc_default_options = {"members": True, "inherited-members": True}
3843

3944
autosectionlabel_prefix_document = True
4045

@@ -50,10 +55,8 @@
5055
extensions.append("sphinx.ext.mathjax")
5156
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
5257

53-
autodoc_default_options = {"members": True, "inherited-members": True}
54-
5558
# Add any paths that contain templates here, relative to this directory.
56-
templates_path = ['_templates']
59+
templates_path = ["_templates"]
5760

5861
# generate autosummary even if no references
5962
autosummary_generate = True
@@ -63,7 +66,7 @@
6366

6467
# The main toctree document.
6568
main_doc = "contents"
66-
master_doc = 'index'
69+
master_doc = "index"
6770

6871
# List of patterns, relative to source directory, that match files and
6972
# directories to ignore when looking for source files.
@@ -78,7 +81,7 @@
7881
add_function_parentheses = False
7982

8083
# The name of the Pygments (syntax highlighting) style to use.
81-
#pygments_style = "sphinx"
84+
pygments_style = "sphinx"
8285

8386
# -- Options for HTML output -------------------------------------------------
8487

@@ -111,20 +114,21 @@ def linkcode_resolve(domain, info):
111114
def find_source():
112115
# try to find the file and line number, based on code from numpy:
113116
# https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286
114-
obj = sys.modules[info['module']]
115-
for part in info['fullname'].split('.'):
117+
obj = sys.modules[info["module"]]
118+
for part in info["fullname"].split("."):
116119
obj = getattr(obj, part)
117120
import inspect
118121
import os
122+
119123
fn = inspect.getsourcefile(obj)
120124
fn = os.path.relpath(fn, start=os.path.dirname(sica.__file__))
121125
source, lineno = inspect.getsourcelines(obj)
122126
return fn, lineno, lineno + len(source) - 1
123127

124-
if domain != 'py' or not info['module']:
128+
if domain != "py" or not info["module"]:
125129
return None
126130
try:
127-
filename = 'sica/%s#L%d-L%d' % find_source()
131+
filename = "sica/%s#L%d-L%d" % find_source()
128132
except Exception:
129-
filename = info['module'].replace('.', '/') + '.py'
133+
filename = info["module"].replace(".", "/") + ".py"
130134
return "https://github.com/ncaptier/stabilized-ica/blob/master/%s" % filename

0 commit comments

Comments
 (0)