Skip to content

Commit dd50822

Browse files
committed
readthedocs: use poetry config
This shares required packages to build docs with poetry instead of a requirements.txt with duplicate info.
1 parent e8e7634 commit dd50822

File tree

5 files changed

+31
-18
lines changed

5 files changed

+31
-18
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
steps:
99
- run: pipx install poetry
1010
- uses: actions/checkout@v3
11-
- run: poetry install --only=doc
11+
- run: poetry install --only=docs
1212
- run: poetry run make -C docs/ html
1313
lint:
1414
runs-on: ubuntu-22.04

.readthedocs.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
# Required
66
version: 2
77

8+
build:
9+
os: "ubuntu-22.04"
10+
tools:
11+
python: "3.10"
12+
jobs:
13+
post_create_environment:
14+
- pip install poetry
15+
- poetry config virtualenvs.create false
16+
post_install:
17+
- poetry install --only=docs
18+
819
# Build documentation in the docs/ directory with Sphinx
920
sphinx:
1021
configuration: docs/conf.py
@@ -13,9 +24,3 @@ sphinx:
1324
# Optionally build your docs in additional formats such as PDF
1425
# formats:
1526
# - pdf
16-
17-
# Optionally set the version of Python and requirements required to build your docs
18-
python:
19-
version: 3.8
20-
install:
21-
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

poetry.lock

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ black = "^23"
5757
flake8 = "^6.0.0"
5858
isort = "^5.12.0"
5959

60-
[tool.poetry.group.doc.dependencies]
60+
[tool.poetry.group.docs.dependencies]
6161
sphinx = "^6.1.3"
6262
sphinx-rtd-theme = "^1.2.0"
63+
toml = "^0.10.2"
64+
typing-extensions = "^4.5.0"
6365

6466
[tool.poetry.group.test.dependencies]
6567
coverage = {extras = ["toml"], version = "^7.2.3"}

0 commit comments

Comments
 (0)