diff --git a/.readthedocs.yml b/.readthedocs.yml index 33479a395..153e5cf82 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,8 +10,10 @@ build: tools: python: "3.8" jobs: + pre_install: # Lock version of torch at 1.11 + - pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pre_build: - - python -m setuptools_scm + - python -m setuptools_scm # Get correct version number # Build documentation in the docs/ directory with Sphinx sphinx: @@ -25,4 +27,8 @@ sphinx: # Optionally set the version of Python and requirements required to build your docs python: install: - - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - docs + - pyro diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92649b2fe..c5dcd2f3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,8 +9,7 @@ linting, testing, and building the documentation, run the following: ```bash git clone https://github.com/cornellius-gp/gpytorch.git cd gpytorch -pip install -e .[dev,examples,pyro,keops,test] # keops and pyro are optional -pip install -r docs/requirements.txt +pip install -e .[dev,docs,examples,keops,pyro,test] # keops and pyro are optional pre-commit install ``` diff --git a/README.md b/README.md index 60af2a2c9..70a292690 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,7 @@ If you are contributing a pull request, it is best to perform a manual installat ```sh git clone https://github.com/cornellius-gp/gpytorch.git cd gpytorch -pip install -e .[dev,examples,test,pyro,keops] -``` - -To generate the documentation locally, you will also need to run the following command -from the linear_operator folder: - -```sh -pip install -r docs/requirements.txt +pip install -e .[dev,docs,examples,keops,pyro,test] # keops and pyro are optional ``` #### ArchLinux Package diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 2a300985f..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,14 +0,0 @@ -setuptools_scm<=7.1.0 -ipython<=8.6.0 -ipykernel<=6.17.1 -linear_operator>=0.5.0 -m2r2<=0.3.3.post2 -nbclient<=0.7.3 -nbformat<=5.8.0 -nbsphinx<=0.9.1 -platformdirs<=3.2.0 -pyro-ppl -sphinx<=6.2.1 -sphinx_rtd_theme<0.5 -sphinx_autodoc_typehints<=1.23.0 -torch>=1.11 diff --git a/setup.py b/setup.py index 649e2fead..f86a41a7c 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,8 @@ def find_version(*file_paths): torch_min = "1.11" install_requires = [ "scikit-learn", - "linear_operator>=0.5.0", + "scipy", + "linear_operator>=0.5.2", ] # if recent dev version of PyTorch is installed, no need to install stable try: @@ -72,10 +73,23 @@ def find_version(*file_paths): python_requires=">=3.8", install_requires=install_requires, extras_require={ - "dev": ["ufmt", "twine", "pre-commit"], + "dev": ["pre-commit", "setuptools_scm", "twine", "ufmt"], + "docs": [ + "ipykernel<=6.17.1", + "ipython<=8.6.0", + "m2r2<=0.3.3.post2", + "nbclient<=0.7.3", + "nbformat<=5.8.0", + "nbsphinx<=0.9.1", + "platformdirs<=3.2.0", + "setuptools_scm<=7.1.0", + "sphinx<=6.2.1", + "sphinx_autodoc_typehints<=1.23.0", + "sphinx_rtd_theme<0.5", + ], "examples": ["ipython", "jupyter", "matplotlib", "scipy", "torchvision", "tqdm"], - "pyro": ["pyro-ppl>=1.8"], "keops": ["pykeops>=1.1.1"], + "pyro": ["pyro-ppl>=1.8"], "test": ["flake8==4.0.1", "flake8-print==4.0.0", "pytest", "nbval"], }, test_suite="test",