Skip to content

Commit 608052d

Browse files
committed
Update RTD configuration, and linear_operator requirement.
RTD is removing the "use system packages" feature on 29 Aug 2023. This PR ensures that our docs will sill build. Moreover, the linear_operator requirement needs to be updated for #2288.
1 parent 1c743fa commit 608052d

File tree

6 files changed

+28
-30
lines changed

6 files changed

+28
-30
lines changed

.conda/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ requirements:
1818
run:
1919
- pytorch>=1.11
2020
- scikit-learn
21-
- linear_operator>=0.5.0
21+
- linear_operator>=0.5.2
2222

2323
test:
2424
imports:

.readthedocs.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ build:
1010
tools:
1111
python: "3.8"
1212
jobs:
13+
pre_install: # Lock version of torch at 1.11
14+
- pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
1315
pre_build:
14-
- python -m setuptools_scm
16+
- python -m setuptools_scm # Get correct version number
1517

1618
# Build documentation in the docs/ directory with Sphinx
1719
sphinx:
@@ -25,4 +27,8 @@ sphinx:
2527
# Optionally set the version of Python and requirements required to build your docs
2628
python:
2729
install:
28-
- requirements: docs/requirements.txt
30+
- method: pip
31+
path: .
32+
extra_requirements:
33+
- docs
34+
- pyro

CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ linting, testing, and building the documentation, run the following:
99
```bash
1010
git clone https://github.com/cornellius-gp/gpytorch.git
1111
cd gpytorch
12-
pip install -e .[dev,examples,pyro,keops,test] # keops and pyro are optional
13-
pip install -r docs/requirements.txt
12+
pip install -e .[dev,docs,examples,keops,pyro,test] # keops and pyro are optional
1413
pre-commit install
1514
```
1615

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,7 @@ If you are contributing a pull request, it is best to perform a manual installat
5757
```sh
5858
git clone https://github.com/cornellius-gp/gpytorch.git
5959
cd gpytorch
60-
pip install -e .[dev,examples,test,pyro,keops]
61-
```
62-
63-
To generate the documentation locally, you will also need to run the following command
64-
from the linear_operator folder:
65-
66-
```sh
67-
pip install -r docs/requirements.txt
60+
pip install -e .[dev,docs,examples,keops,pyro,test] # keops and pyro are optional
6861
```
6962

7063
#### ArchLinux Package

docs/requirements.txt

-14
This file was deleted.

setup.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def find_version(*file_paths):
4040
torch_min = "1.11"
4141
install_requires = [
4242
"scikit-learn",
43-
"linear_operator>=0.5.0",
43+
"scipy",
44+
"linear_operator>=0.5.2",
4445
]
4546
# if recent dev version of PyTorch is installed, no need to install stable
4647
try:
@@ -72,10 +73,23 @@ def find_version(*file_paths):
7273
python_requires=">=3.8",
7374
install_requires=install_requires,
7475
extras_require={
75-
"dev": ["ufmt", "twine", "pre-commit"],
76+
"dev": ["pre-commit", "setuptools_scm", "twine", "ufmt"],
77+
"docs": [
78+
"ipykernel<=6.17.1",
79+
"ipython<=8.6.0",
80+
"m2r2<=0.3.3.post2",
81+
"nbclient<=0.7.3",
82+
"nbformat<=5.8.0",
83+
"nbsphinx<=0.9.1",
84+
"platformdirs<=3.2.0",
85+
"setuptools_scm<=7.1.0",
86+
"sphinx<=6.2.1",
87+
"sphinx_autodoc_typehints<=1.23.0",
88+
"sphinx_rtd_theme<0.5",
89+
],
7690
"examples": ["ipython", "jupyter", "matplotlib", "scipy", "torchvision", "tqdm"],
77-
"pyro": ["pyro-ppl>=1.8"],
7891
"keops": ["pykeops>=1.1.1"],
92+
"pyro": ["pyro-ppl>=1.8"],
7993
"test": ["flake8==4.0.1", "flake8-print==4.0.0", "pytest", "nbval"],
8094
},
8195
test_suite="test",

0 commit comments

Comments
 (0)