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
1922project = 'PEtab'
20- copyright = '2018-2021 , the PEtab developers'
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
4951# List of patterns, relative to source directory, that match files and
5052# directories to ignore when looking for source files.
5153# This pattern also affects html_static_path and html_extra_path.
52- exclude_patterns = ['build/doctrees' , 'build/html' ]
54+ exclude_patterns = [
55+ 'build/doctrees' ,
56+ 'build/html' ,
57+ '**.ipynb_checkpoints' ,
58+ 'logo/LICENSE.md' ,
59+ ]
5360
5461master_doc = 'index'
5562
7279 '.md' : 'markdown' ,
7380}
7481
82+ # ignore numpy warnings
83+ warnings .filterwarnings ("ignore" , message = "numpy.dtype size changed" )
84+ warnings .filterwarnings ("ignore" , message = "numpy.ufunc size changed" )
85+ # ignore recommonmark warnings
86+ # https://github.com/readthedocs/recommonmark/issues/177
87+ warnings .filterwarnings ("ignore" ,
88+ message = "Container node skipped: type=document" )
89+
7590# -- Options for HTML output -------------------------------------------------
7691
7792# The theme to use for HTML and HTML Help pages. See the documentation for
7893# a list of builtin themes.
7994#
8095html_theme = 'sphinx_rtd_theme'
81- def setup (app ):
82- app .add_stylesheet ('custom.css' )
96+
8397# Add any paths that contain custom static files (such as style sheets) here,
8498# relative to this directory. They are copied after the builtin static files,
8599# so a file named "default.css" will overwrite the builtin "default.css".
@@ -94,3 +108,14 @@ def setup(app):
94108}
95109
96110html_logo = 'logo/PEtab.png'
111+
112+
113+ def skip_some_objects (app , what , name , obj , skip , options ):
114+ """Exclude some objects from the documentation"""
115+ if getattr (obj , '__module__' , None ) == 'collections' :
116+ return True
117+
118+
119+ def setup (app ):
120+ """Sphinx setup"""
121+ app .connect ('autodoc-skip-member' , skip_some_objects )
0 commit comments