Skip to content

Commit 4b91724

Browse files
authored
Fix Read the Docs builds (#111)
* Fix Read the Docs builds The builds have been failing for a long time due to changes in the config file format. This commit introduces the following changes: * Update the Read the Docs config to meet current requirements * De-duplicate dependencies listed in `requirements_dev.txt` and `environment.yml` by moving docs dependencies to `requirements_docs.txt` and referencing it in the RTD config and in the `requirements_dev.txt` file. These changes are expected to fix RTD builds.
1 parent 06d9794 commit 4b91724

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

docs/environment.yml

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

readthedocs.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
version: 2
2+
13
build:
2-
image: latest
4+
os: 'ubuntu-24.04'
5+
tools:
6+
python: '3.13'
37

4-
python:
5-
version: 3.7
8+
sphinx:
9+
configuration: 'docs/source/conf.py'
10+
fail_on_warning: true
611

7-
conda:
8-
file: docs/environment.yml
12+
python:
13+
install:
14+
- requirements: 'requirements_docs.txt'

requirements_dev.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1+
-r requirements_docs.txt
12
pytest
23
flake8
3-
sphinx
4-
nbsphinx
5-
pandoc
6-
ipykernel
7-
nbconvert
84
defusedxml
95
jinja2
106
requests

requirements_docs.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx
2+
nbsphinx
3+
pandoc
4+
nbconvert
5+
ipykernel

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
sys.path[:0] = os.path.dirname(__file__)
1616

1717
reqs = [line.strip() for line in open('requirements.txt')]
18-
dev_reqs = [line.strip() for line in open('requirements_dev.txt')]
18+
docs_reqs = [line.strip() for line in open('requirements_docs.txt')]
19+
dev_reqs = [
20+
line.strip()
21+
for line in open('requirements_dev.txt')
22+
if line.strip() and not line.strip().startswith("-r ")
23+
]
24+
dev_reqs.extend(docs_reqs)
1925

2026
setup(name='esgf-pyclient',
2127
version=__version__,

0 commit comments

Comments
 (0)