11import datetime
2- import doctest
32import os
43import sys
54
65import sphinx_rtd_theme
76
87sys .path .insert (0 , os .path .abspath ('../../' ))
98
9+ project = 'PyTorch Geometric Signed Directed'
10+ author = 'Yixuan He'
11+ copyright = f'{ datetime .datetime .now ().year } , { author } '
12+
1013extensions = [
11- 'sphinx.ext.autodoc' ,
12- 'sphinx.ext.autosummary' ,
13- 'sphinx.ext.doctest' ,
14+ 'autoapi.extension' ,
1415 'sphinx.ext.intersphinx' ,
1516 'sphinx.ext.mathjax' ,
1617 'sphinx.ext.napoleon' ,
1718 'sphinx.ext.viewcode' ,
1819 'sphinx.ext.githubpages' ,
1920]
2021
21- source_suffix = '.rst'
2222master_doc = 'modules/root'
23-
24- project = 'PyTorch Geometric Signed Directed'
25- author = 'Yixuan He'
26- copyright = '{}, {}' .format (datetime .datetime .now ().year , author )
23+ source_suffix = '.rst'
2724
2825html_theme = 'sphinx_rtd_theme'
2926html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
3835html_static_path = ['_static' ]
3936html_context = {'css_files' : ['_static/css/custom.css' ]}
4037
41- doctest_default_flags = doctest .NORMALIZE_WHITESPACE
42- intersphinx_mapping = {'python' : ('https://docs.python.org/' , None )}
43- add_module_names = False
44- autosummary_generate = True
38+ intersphinx_mapping = {
39+ 'python' : ('https://docs.python.org/3' , None ),
40+ }
4541
46- autodoc_mock_imports = [
47- 'torch' ,
48- 'torch_geometric' ,
49- 'torch_sparse' ,
50- 'torch_scatter' ,
42+ autoapi_type = 'python'
43+ autoapi_dirs = [os .path .abspath ('../../torch_geometric_signed_directed' )]
44+ autoapi_file_patterns = ['*.py' ]
45+ autoapi_root = 'modules/_autoapi'
46+ autoapi_keep_files = True
47+ autoapi_add_toctree_entry = False
48+ autoapi_options = [
49+ 'members' ,
50+ 'undoc-members' ,
51+ 'show-inheritance' ,
52+ 'show-module-summary' ,
53+ 'special-members' ,
54+ 'imported-members' ,
5155]
5256
5357exclude_patterns = ['_build' , 'Thumbs.db' , '.DS_Store' ]
5458
55-
5659def setup (app ):
57- def skip (app , what , name , obj , skip , options ):
58- members = ['__init__' , '__repr__' , '__weakref__' , '__dict__' , '__module__' ]
59- return True if name in members else skip
60-
61- app .connect ('autodoc-skip-member' , skip )
60+ app .add_css_file ('css/custom.css' )
0 commit comments