-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.readthedocs.yaml
48 lines (45 loc) · 2.13 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
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz
jobs:
post_checkout:
# Download and uncompress the binary
# https://git-lfs.github.com/
- mkdir -p tmp
- wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.4/git-lfs-linux-amd64-v3.1.4.tar.gz -O tmp/git-lfs.tar.gz
- tar xvfz tmp/git-lfs.tar.gz -C tmp/
# Modify LFS config paths to point where git-lfs binary was downloaded
- git config filter.lfs.process "`pwd`/tmp/git-lfs filter-process"
- git config filter.lfs.smudge "`pwd`/tmp/git-lfs smudge -- %f"
- git config filter.lfs.clean "`pwd`/tmp/git-lfs clean -- %f"
# Make LFS available in current repository
- ./tmp/git-lfs install
# Download content from remote
- ./tmp/git-lfs fetch
# Make local files to have the real content on them
- ./tmp/git-lfs checkout
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
# Turn `python -m virtualenv` into `python -c pass`
- truncate --size 0 $( dirname $( uv python find ) )/../lib/python3*/site-packages/virtualenv/__main__.py
post_create_environment:
- uv venv $READTHEDOCS_VIRTUALENV_PATH
# Turn `python -m pip` into `python -c pass`
- truncate --size 0 $( ls -d $READTHEDOCS_VIRTUALENV_PATH/lib/python3* )/site-packages/pip.py
# Use a cache dir in the same mount to halve the install time
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install --cache-dir $READTHEDOCS_VIRTUALENV_PATH/../../uv_cache --upgrade sphinx
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install --cache-dir $READTHEDOCS_VIRTUALENV_PATH/../../uv_cache --index-strategy unsafe-best-match --no-deps . -r environment/requirements.txt -r environment/requirements-dev.txt
# Build documentation in the "docs/source" directory with Sphinx
sphinx:
configuration: docs/source/conf.py