-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.readthedocs.yaml
46 lines (41 loc) · 1.95 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
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
build:
os: "ubuntu-24.04"
tools:
python: "3.12"
nodejs: "20"
jobs:
# Install micromamba
pre_create_environment:
# The recommended syntax in the micromamba docs is process substitution.
# RTD's default shell chokes on it, so we're doing it in multiple steps
# instead.
- curl -L micro.mamba.pm/install.sh > /tmp/micromamba-install.sh
- chmod +x /tmp/micromamba-install.sh
# For some reason, SHELL is not set. The install script requires it.
- SHELL=/bin/bash /bin/bash /tmp/micromamba-install.sh
# Override the create_environment step (undocumented feature) to create
# multiple environments.
create_environment:
# Pin micromamba
- /bin/bash --login -c "micromamba self-update --version 2.0.5"
# Create the env for building the docs
- /bin/bash --login -c "micromamba env create -n jupytergis-docs -f docs/environment-docs.yml"
# Create the isolated env for building JupyterGIS
- /bin/bash --login -c "micromamba create -n jupytergis-build -c conda-forge nodejs hatch pip python=3.13"
- /bin/bash --login -c "micromamba run -n jupytergis-build pip install 'jupyterlab==4.3' 'datamodel-code-generator>=0.23.0'"
# Override the install step to do nothing - we already created the envs
install:
- "echo 'Skipping! We already have the environments we need.'"
# Before building the docs, build JupyterGIS in its isolated environment,
# then install the wheels into the docs environment.
pre_build:
- /bin/bash --login -c "micromamba run -n jupytergis-build jlpm install"
- /bin/bash --login -c "micromamba run -n jupytergis-build jlpm build"
build:
html:
- |-
/bin/bash --login -c "cd docs && micromamba run -n jupytergis-docs \
python -m sphinx -T -b html -d _build/doctrees -D language=en . \
$READTHEDOCS_OUTPUT/html"