-
Notifications
You must be signed in to change notification settings - Fork 5
/
.readthedocs.yaml
53 lines (45 loc) · 1.59 KB
/
.readthedocs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Required
version: 2
#Set the OS, Python version and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.10"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
pre_install:
#idea is to use poetry to build the package, and then export it to a
#requirements file with all the groups.
# Then (see python block), the environment is build by a pip install the
# requirements file.
#all the groups are needed because figures are genereted, making use of
#the package itself! Thus no mocks in the
- pwd
- ls
- poetry build
- poetry install --all-extras
# create a requirements file of the poetry env
- rm -f ./docs/rtd_requirements.txt
#Specify all the groups (do not use --all-extras because that does not work???)
- poetry export --without-hashes --with=documentation,dev,titan --format=requirements.txt > ./docs/rtd_requirements.txt
pre_build:
# Just print out the environment the documentation is build in
- python -m pip list
- pip install .
# Build documentation in the "docs/" directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: ./docs/rtd_requirements.txt