Skip to content

Commit

Permalink
build: Bump versions for Read the Docs (#1761)
Browse files Browse the repository at this point in the history
* build: Bump versions for Read the Docs

We don't support Python `3.8` anymore.

Poetry `1.8.1` matches what's currently in our Poetry lockfile.

Building the docs is currently failing [1], and this ideally will fix that.

[1] From readthedocs.org:
```
poetry install -vvv --without dev --with docs --with all-runtimes --with all-runtimes-dev
Loading configuration file /home/docs/.config/pypoetry/config.toml
The currently activated Python version 3.8.18 is not supported by the project (>=3.9,<3.12).
Trying to find and use a compatible version.
Trying python3
Trying python3.9
```

* docs: Bump copyright year

* build: Use Python env for server

* build: Use recommended Read the Docs setup

There's still been some failures [2], so I've updated it to follow
their recommendation [1].

[1] https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry
[2]
```
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/mlserver/envs/1761/lib/python3.10/site-packages/sphinx/config.py", line 509, in eval_config_file
    exec(code, namespace)  # NoQA: S102
  File "/home/docs/checkouts/readthedocs.org/user_builds/mlserver/checkouts/1761/docs/conf.py", line 19, in <module>
    import sphinx_material
ModuleNotFoundError: No module named 'sphinx_material'
```
  • Loading branch information
Jesse Claven authored and jesse-c committed May 16, 2024
1 parent f9db7ab commit 8a48f5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ formats:
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.10"
jobs:
# Set up Poetry
# From https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-poetry
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry==1.4.2
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
- pip install poetry==1.8.1
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install -vvv --without dev --with docs --with all-runtimes --with all-runtimes-dev
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install -vvv --without dev --with docs --with all-runtimes --with all-runtimes-dev
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

start:
sphinx-autobuild . ./_build/html
poetry run sphinx-autobuild . ./_build/html

install-dev:
poetry install -C .. --with docs --with all-runtimes --with all-runtimes-dev
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import sphinx_material

project = "MLServer"
copyright = "2023, Seldon Technologies"
copyright = "2024, Seldon Technologies"
html_title = "MLServer Documentation"
author = "Seldon Technologies"

Expand Down

0 comments on commit 8a48f5b

Please sign in to comment.