Skip to content

Commit 52bf677

Browse files
committed
updates
1 parent 8b92e56 commit 52bf677

4 files changed

Lines changed: 33 additions & 37 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
python-version: [3.8, 3.9]
17+
python-version: [3.11, 3.12]
1818
os: [ubuntu-latest]
1919
torch-version: [2.3.0]
2020
include:
2121
- torch-version: 2.3.0
2222

2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install dependencies
@@ -37,11 +37,12 @@ jobs:
3737
- run: which python
3838
- name: Run installation.
3939
run: |
40+
python -m pip install --upgrade pip
4041
python -m pip install torch==2.3.0 torchvision torchaudio -f https://download.pytorch.org/whl/cpu/torch_stable.html
4142
python -m pip install torch-sparse -f https://data.pyg.org/whl/torch-2.3.0+cpu.html
4243
python -m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.3.0+cpu.html
4344
python -m pip install torch-geometric
44-
python -m pip install sphinx sphinx_rtd_theme
45+
python -m pip install sphinx sphinx-rtd-theme
4546
python -m pip install -e .[test]
4647
- name: Lint with flake8
4748
run: |

.readthedocs.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
version: 2
22

33
build:
4-
os: ubuntu-22.04
5-
tools:
6-
python: "3.9"
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.12"
77

8-
python:
9-
install:
10-
- requirements: docs/requirements.txt
11-
- method: setuptools
12-
path: .
13-
148
sphinx:
159
configuration: docs/source/conf.py
1610

17-
formats: []
11+
python:
12+
install:
13+
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
https://download.pytorch.org/whl/cpu/torch-1.13.0%2Bcpu-cp39-cp39-linux_x86_64.whl
2-
numpy>=1.19.5
3-
git+https://github.com/pyg-team/pyg_sphinx_theme.git
4-
scipy
5-
networkx
1+
sphinx==7.0
2+
sphinx-rtd-theme
3+
sphinx-autoapi
4+
Jinja2>=3.0

docs/source/conf.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import datetime
2-
import sphinx_rtd_theme
32
import doctest
4-
import torch_geometric_signed_directed
3+
import sphinx_rtd_theme
54

65
extensions = [
7-
'sphinx.ext.autodoc',
6+
'autoapi.extension',
87
'sphinx.ext.doctest',
98
'sphinx.ext.intersphinx',
109
'sphinx.ext.mathjax',
@@ -15,39 +14,40 @@
1514

1615
source_suffix = '.rst'
1716
master_doc = 'index'
18-
1917
author = 'Yixuan He'
2018
project = 'PyTorch Geometric Signed Directed'
2119
copyright = '{}, {}'.format(datetime.datetime.now().year, author)
2220

2321
html_theme = 'sphinx_rtd_theme'
24-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
25-
26-
doctest_default_flags = doctest.NORMALIZE_WHITESPACE
27-
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
28-
2922
html_theme_options = {
3023
'collapse_navigation': False,
3124
'display_version': True,
3225
'logo_only': True,
3326
}
3427

28+
doctest_default_flags = doctest.NORMALIZE_WHITESPACE
29+
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
30+
3531
html_logo = '_static/img/text_logo.jpg'
3632
html_static_path = ['_static']
3733
html_context = {'css_files': ['_static/css/custom.css']}
38-
3934
add_module_names = False
4035

36+
autoapi_type = 'python'
37+
autoapi_dirs = ['../../torch_geometric_signed_directed/']
38+
autoapi_keep_files = True
39+
autoapi_generate_api_docs = True
40+
41+
autodoc_mock_imports = [
42+
'torch',
43+
'torch_geometric',
44+
'torch_sparse',
45+
'torch_scatter',
46+
]
4147

4248
def setup(app):
4349
def skip(app, what, name, obj, skip, options):
44-
members = [
45-
'__init__',
46-
'__repr__',
47-
'__weakref__',
48-
'__dict__',
49-
'__module__',
50-
]
50+
members = ['__init__', '__repr__', '__weakref__', '__dict__', '__module__']
5151
return True if name in members else skip
5252

53-
app.connect('autodoc-skip-member', skip)
53+
app.connect('autodoc-skip-member', skip)

0 commit comments

Comments
 (0)