Skip to content

Commit bc7970c

Browse files
committed
docs
1 parent 7cfdc1f commit bc7970c

4 files changed

Lines changed: 38 additions & 119 deletions

File tree

docs/requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
sphinx==7.0
1+
sphinx
22
sphinx-rtd-theme
33
sphinx-autoapi
4-
Jinja2>=3.0
4+
numpy
5+
scipy
6+
networkx

docs/source/conf.py

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
11
import datetime
2-
import doctest
32
import os
43
import sys
54

65
import sphinx_rtd_theme
76

87
sys.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+
1013
extensions = [
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'
2222
master_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

2825
html_theme = 'sphinx_rtd_theme'
2926
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
@@ -38,24 +35,26 @@
3835
html_static_path = ['_static']
3936
html_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

5357
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
5458

55-
5659
def 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')

docs/source/index.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
PyTorch Geometric Signed Directed
22
=================================
33

4-
PyTorch Geometric Signed Directed is a signed and directed graph neural
5-
network extension library for PyTorch Geometric.
4+
This documentation is centered on the package API.
65

76
.. toctree::
87
:maxdepth: 1
98

9+
modules/root
1010
notes/installation
11-
notes/introduction
12-
modules/root
11+
notes/introduction

docs/source/modules/root.rst

Lines changed: 8 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,13 @@
1-
Package Reference
2-
=================
1+
PyTorch Geometric Signed Directed
2+
=================================
3+
4+
Signed and directed graph neural network utilities for PyTorch Geometric.
35

46
.. contents:: Contents
57
:local:
68

7-
Top-level package
8-
-----------------
9-
10-
.. automodule:: torch_geometric_signed_directed
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
14-
15-
Data
16-
----
17-
18-
Directed data
19-
^^^^^^^^^^^^^
20-
21-
.. automodule:: torch_geometric_signed_directed.data.directed
22-
:members:
23-
:undoc-members:
24-
:show-inheritance:
25-
26-
Signed data
27-
^^^^^^^^^^^
28-
29-
.. automodule:: torch_geometric_signed_directed.data.signed
30-
:members:
31-
:undoc-members:
32-
:show-inheritance:
33-
34-
General data
35-
^^^^^^^^^^^^
36-
37-
.. automodule:: torch_geometric_signed_directed.data.general
38-
:members:
39-
:undoc-members:
40-
:show-inheritance:
41-
42-
Neural network modules
43-
----------------------
44-
45-
Directed models
46-
^^^^^^^^^^^^^^^
47-
48-
.. automodule:: torch_geometric_signed_directed.nn.directed
49-
:members:
50-
:undoc-members:
51-
:show-inheritance:
52-
53-
Signed models
54-
^^^^^^^^^^^^^
55-
56-
.. automodule:: torch_geometric_signed_directed.nn.signed
57-
:members:
58-
:undoc-members:
59-
:show-inheritance:
60-
61-
General models
62-
^^^^^^^^^^^^^^
63-
64-
.. automodule:: torch_geometric_signed_directed.nn.general
65-
:members:
66-
:undoc-members:
67-
:show-inheritance:
68-
69-
Utilities
70-
---------
71-
72-
Directed utilities
73-
^^^^^^^^^^^^^^^^^^
74-
75-
.. automodule:: torch_geometric_signed_directed.utils.directed
76-
:members:
77-
:undoc-members:
78-
:show-inheritance:
79-
80-
Signed utilities
81-
^^^^^^^^^^^^^^^^
82-
83-
.. automodule:: torch_geometric_signed_directed.utils.signed
84-
:members:
85-
:undoc-members:
86-
:show-inheritance:
87-
88-
General utilities
89-
^^^^^^^^^^^^^^^^^
9+
Package API
10+
-----------
9011

91-
.. automodule:: torch_geometric_signed_directed.utils.general
92-
:members:
93-
:undoc-members:
94-
:show-inheritance:
12+
.. autoapi-tree::
13+
:nosignatures:

0 commit comments

Comments
 (0)