forked from jax-md/jax-md
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.readthedocs.yml
More file actions
39 lines (35 loc) · 1.14 KB
/
.readthedocs.yml
File metadata and controls
39 lines (35 loc) · 1.14 KB
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
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
sphinx:
configuration: docs/conf.py
formats:
- htmlzip
build:
os: ubuntu-24.04
tools:
python: "3.12"
jobs:
pre_create_environment:
# Install uv
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
# Create virtual environment with uv
- uv venv $READTHEDOCS_VIRTUALENV_PATH
install:
# Install jax-md and doc dependencies with uv
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs
pre_build:
- cp -r examples docs/
- uv run jupytext --to notebook docs/examples/*.py
- uv run jupytext --to notebook docs/examples/units/*.py
- rm docs/examples/*.py
- rm docs/examples/units/*.py
post_build:
- mkdir -p $READTHEDOCS_OUTPUT/html/notebooks
- mkdir -p $READTHEDOCS_OUTPUT/html/notebooks/units
- cp docs/examples/*.ipynb $READTHEDOCS_OUTPUT/html/notebooks/
- cp docs/examples/units/*.ipynb $READTHEDOCS_OUTPUT/html/notebooks/units/