Skip to content

Commit 7ce9484

Browse files
Let readthedocs build the documentation environment based on env_climada.yml (#687)
* Use env_climada.yml as environment in readthedocs Remove requirements/env_docs.yml * Fix wrong path in doc/README.md * Add note on the removal of requirements/env_docs.yml * Try installing additional packages in readthedocs environment * Try not specifying the readthedocs environment name * Remove custom package installation from RTD config * Fix Python version in RTD build process * Update CHANGELOG.md --------- Co-authored-by: emanuel-schmid <[email protected]>
1 parent f88ecbd commit 7ce9484

File tree

4 files changed

+14
-352
lines changed

4 files changed

+14
-352
lines changed

.readthedocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ build:
55
tools:
66
python: "mambaforge-4.10"
77

8+
# Append fixed Python version to requirements
9+
jobs:
10+
pre_create_environment:
11+
- echo " - python=3.9" >> requirements/env_climada.yml
12+
813
conda:
9-
environment: requirements/env_docs.yml
14+
environment: requirements/env_climada.yml
1015

1116
python:
1217
install:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Code freeze date: YYYY-MM-DD
6767
- climada.hazard.centroids.centr.Centroids.values_from_raster_files
6868
- climada.hazard.centroids.centr.Centroids.values_from_vector_files
6969
- climada.hazard.centroids.centr.generate_nat_earth_centroids
70+
- `requirements/env_docs.yml`. The regular environment specs are now used to build the online documentation [#687](https://github.com/CLIMADA-project/climada_python/pull/687)
7071

7172
## 4.1.1
7273

doc/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ Next, execute `make` (this might take a while when executed for the first time)
2929
make html
3030
```
3131

32-
The documentation will be placed in `doc/_html`. Simply open the page `doc/_html/index.html` with your browser.
32+
The documentation will be placed in `doc/_build/html`. Simply open the page `doc/_build/html/index.html` with your browser.
3333

3434
## Updating the Documentation Environment for Readthedocs.org
3535

3636
The online documentation is built by [`readthedocs.org`](https://readthedocs.org/).
37-
Their servers have a limited capacity, which is typically exceeded by Anaconda when it tries to resolve all dependencies for CLIMADA.
38-
We therefore provide a dedicated environment with *fixed* package versions in `requirements/env_docs.yml`.
37+
Their servers have a limited capacity.
38+
In the past, this capacity was exceeded by Anaconda when it tried to resolve all dependencies for CLIMADA.
39+
We therefore provided a dedicated environment with *fixed* package versions in `requirements/env_docs.yml`.
40+
As of commit `8c66d8e4a4c93225e3a337d8ad69ab09b48278e3`, this environment was removed and the online documentation environment is built using the specs in `requirements/env_climada.yml`.
41+
If this should fail in the future, revert the changes by `8c66d8e4a4c93225e3a337d8ad69ab09b48278e3` and update the environment specs in `requirements/env_docs.yml` with the following instructions.
3942

40-
For re-creating this environment, we provide a Dockerfile.
43+
For re-creating the documentation environment, we provide a Dockerfile.
4144
You can use it to build a new environment and extract the exact versions from it.
4245
This might be necessary when we upgrade to a new version of Python, or when dependencies are updated.
4346
**NOTE:** Your machine must be able to run/virtualize an AMD64 OS.

requirements/env_docs.yml

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

0 commit comments

Comments
 (0)