Skip to content

Commit

Permalink
readthedocs: use poetry config
Browse files Browse the repository at this point in the history
This shares required packages to build docs with poetry instead of a
requirements.txt with duplicate info.
  • Loading branch information
dlech committed Apr 21, 2023
1 parent e8e7634 commit dd50822
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- run: pipx install poetry
- uses: actions/checkout@v3
- run: poetry install --only=doc
- run: poetry install --only=docs
- run: poetry run make -C docs/ html
lint:
runs-on: ubuntu-22.04
Expand Down
17 changes: 11 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
# Required
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
- pip install poetry
- poetry config virtualenvs.create false
post_install:
- poetry install --only=docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand All @@ -13,9 +24,3 @@ sphinx:
# Optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: docs/requirements.txt
6 changes: 0 additions & 6 deletions docs/requirements.txt

This file was deleted.

20 changes: 16 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ black = "^23"
flake8 = "^6.0.0"
isort = "^5.12.0"

[tool.poetry.group.doc.dependencies]
[tool.poetry.group.docs.dependencies]
sphinx = "^6.1.3"
sphinx-rtd-theme = "^1.2.0"
toml = "^0.10.2"
typing-extensions = "^4.5.0"

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

0 comments on commit dd50822

Please sign in to comment.