From 2651fc2d0cd2ffe9c5fe9379ca6c3e21e7f9e0b9 Mon Sep 17 00:00:00 2001 From: Gregory Way Date: Fri, 1 Sep 2023 11:28:44 -0600 Subject: [PATCH] configure RTD to use poetry --- .readthedocs.yml | 12 +++++++++++- pyproject.toml | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5c2239c9..1df9cb1a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,11 +4,21 @@ build: os: ubuntu-22.04 tools: python: "3.11" + jobs: + post_create_environment: + # Install poetry + # https://python-poetry.org/docs/#installing-manually + - pip install poetry + # Tell poetry to not use a virtual environment + - poetry config virtualenvs.create false + post_install: + # Install dependencies with 'docs' dependency group + # https://python-poetry.org/docs/managing-dependencies/#dependency-groups + - poetry install --with docs python: install: - requirements: docs/requirements.txt - - requirements: requirements.txt sphinx: builder: html diff --git a/pyproject.toml b/pyproject.toml index 5be91431..daa719de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,12 @@ codecov = ">=2.1.12" pytest-cov = "^4.1.0" pre-commit = ">=3.3.2" +[tool.poetry.group.docs] +optional = true + +[tool.poetry.group.docs.dependencies] +mkdocs = "*" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"