From 825ad9284e1f4fc3676bb65a569b0d470b842e0f Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Sun, 19 May 2024 14:08:56 +0100 Subject: [PATCH] Update RTD setup and create .readthedocs.yaml (#479) --- .github/workflows/build_docs.yml | 5 +++-- .readthedocs.yaml | 17 +++++++++++++++++ doc/requirements.txt | 5 +++++ pyproject.toml | 4 ---- 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 .readthedocs.yaml create mode 100644 doc/requirements.txt diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 41fe878b..789c8501 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -26,8 +26,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Surprise with docs dependencies run: | - python -m pip install --upgrade pip - pip install ".[docs]" + pip install --upgrade pip + cd doc + pip install -r requirements.txt - name: Build docs run: | cd doc diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..def153a3 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,17 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +sphinx: + configuration: doc/source/conf.py + +python: + install: + - requirements: doc/requirements.txt \ No newline at end of file diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..08a1302d --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ +sphinx +sphinx_rtd_theme +sphinxcontrib-bibtex +sphinxcontrib-spelling +pandas diff --git a/pyproject.toml b/pyproject.toml index 4dc4b1e3..c2843b98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,10 +26,6 @@ dependencies = [ ] dynamic = ["version", "readme"] -[project.optional-dependencies] -test = ["pytest", "pandas"] -docs = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-bibtex", "sphinxcontrib-spelling"] - [project.scripts] surprise = "surprise.__main__:main"