Skip to content

Commit

Permalink
Merge pull request #225 from bluelabsio/RM-64-remove-sphinx-requirements
Browse files Browse the repository at this point in the history
Kill sphinx_requirements.txt - readthedocs build now uses setup.py
  • Loading branch information
Brunope authored Mar 16, 2023
2 parents 18c96ae + cc56dbf commit 8e304d5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 284 deletions.
12 changes: 10 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

python:
version: 3.8
install:
- requirements: docs/source/sphinx_requirements.txt
- method: pip
path: .
extra_requirements:
- docs
system_packages: true

sphinx:
fail_on_warning: false
Expand Down
273 changes: 0 additions & 273 deletions docs/source/sphinx_requirements.txt

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ def initialize_options(self) -> None:
)

docs_dependencies = [
'sphinx>=3', # used to generate and upload docs -
# sphinx-autodoc-typehints requires 3 or better per
# https://github.com/agronholm/sphinx-autodoc-typehints/pull/138
'sphinx-rtd-theme', # used to style docs for readthedocs.io
'sphinx>=5', # used to generate and upload docs -
# need 5.0 or later for compatibility with other packages
'sphinx-rtd-theme>=1', # used to style docs for readthedocs.io
'readthedocs-sphinx-ext>=2', # also used by readthedocs
'recommonmark', # used to be able to use sphinx with markdown
] + (
# needed for readthedocs.io to be able to evaluate modules with
Expand Down
14 changes: 9 additions & 5 deletions tests/integration/test_docs_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e

if [[ $1 == "--help" ]]
then
Expand All @@ -9,7 +9,7 @@ then
elif [[ $1 != "--no-pyenv" ]]
then
echo "Creating virtualenv..."
export PYENV_VERSION=3.8.16
export PYENV_VERSION=3.9.1

TEST_VENV_NAME=test-docs-sphinx-build

Expand All @@ -20,11 +20,15 @@ then
. ${PYENV_ROOT}/versions/${TEST_VENV_NAME}/bin/activate
fi

echo "Upgrading pip..."
pip install --upgrade pip

echo "Installing sphinx dependencies..."
SCRIPT_DIR=$(dirname $0)
DOCS_DIR=${SCRIPT_DIR}/../../docs
SCRIPT_DIR="$(dirname $0)"
ROOT_DIR="${SCRIPT_DIR}/../.."
DOCS_DIR="${ROOT_DIR}/docs"

pip install -r ${DOCS_DIR}/source/sphinx_requirements.txt
pip install .[docs]

cd ${DOCS_DIR}
make clean
Expand Down

0 comments on commit 8e304d5

Please sign in to comment.