44# list see the documentation:
55# https://www.sphinx-doc.org/en/master/usage/configuration.html
66
7+ import os
8+ import subprocess
9+ import sys
10+ import warnings
11+
712# -- Path setup --------------------------------------------------------------
813
914# If extensions (or modules to document with autodoc) are in another directory,
1015# add these directories to sys.path here. If the directory is relative to the
1116# documentation root, use os.path.abspath to make it absolute, like shown here.
1217#
13- import os
14- import sys
1518sys .path .insert (0 , os .path .abspath ('..' ))
1619
1720# -- Project information -----------------------------------------------------
1821
19- project = 'PEtab '
20- copyright = '2018-2021 , the PEtab developers'
22+ project = 'libpetab-python '
23+ copyright = '2018, the PEtab developers'
2124author = 'PEtab developers'
2225
2326# The full version, including alpha/beta/rc tags
2427release = 'latest'
2528
2629# -- Custom pre-build --------------------------------------------------------
2730
28- import subprocess
2931
3032subprocess .run (['python' , 'md2rst.py' ])
3133
3739extensions = [
3840 'sphinx.ext.napoleon' ,
3941 'sphinx.ext.autodoc' ,
40- 'recommonmark' ,
4142 'sphinx.ext.autosummary' ,
43+ 'sphinx.ext.intersphinx' ,
44+ 'sphinx.ext.viewcode' ,
45+ 'recommonmark' ,
4246 'sphinx_markdown_tables' ,
4347 'nbsphinx' ,
4448]
4549
50+ intersphinx_mapping = {
51+ 'pandas' : ('https://pandas.pydata.org/docs/' , None ),
52+ 'numpy' : ('https://numpy.org/devdocs/' , None ),
53+ 'sympy' : ('https://docs.sympy.org/latest/' , None ),
54+ 'python' : ('https://docs.python.org/3' , None ),
55+ }
56+
4657# Add any paths that contain templates here, relative to this directory.
4758templates_path = ['_templates' ]
4859
4960# List of patterns, relative to source directory, that match files and
5061# directories to ignore when looking for source files.
5162# This pattern also affects html_static_path and html_extra_path.
52- exclude_patterns = ['build/doctrees' , 'build/html' ]
63+ exclude_patterns = [
64+ 'build/doctrees' ,
65+ 'build/html' ,
66+ '**.ipynb_checkpoints' ,
67+ 'logo/LICENSE.md' ,
68+ ]
5369
5470master_doc = 'index'
5571
7288 '.md' : 'markdown' ,
7389}
7490
91+ # ignore numpy warnings
92+ warnings .filterwarnings ("ignore" , message = "numpy.dtype size changed" )
93+ warnings .filterwarnings ("ignore" , message = "numpy.ufunc size changed" )
94+ # ignore recommonmark warnings
95+ # https://github.com/readthedocs/recommonmark/issues/177
96+ warnings .filterwarnings ("ignore" ,
97+ message = "Container node skipped: type=document" )
98+
7599# -- Options for HTML output -------------------------------------------------
76100
77101# The theme to use for HTML and HTML Help pages. See the documentation for
78102# a list of builtin themes.
79103#
80104html_theme = 'sphinx_rtd_theme'
81- def setup (app ):
82- app .add_stylesheet ('custom.css' )
105+
83106# Add any paths that contain custom static files (such as style sheets) here,
84107# relative to this directory. They are copied after the builtin static files,
85108# so a file named "default.css" will overwrite the builtin "default.css".
@@ -94,3 +117,14 @@ def setup(app):
94117}
95118
96119html_logo = 'logo/PEtab.png'
120+
121+
122+ def skip_some_objects (app , what , name , obj , skip , options ):
123+ """Exclude some objects from the documentation"""
124+ if getattr (obj , '__module__' , None ) == 'collections' :
125+ return True
126+
127+
128+ def setup (app ):
129+ """Sphinx setup"""
130+ app .connect ('autodoc-skip-member' , skip_some_objects )
0 commit comments