From 6ffbb37b6fb359797e0b437e71c6a611007794f4 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 6 Oct 2023 20:40:04 +0200 Subject: [PATCH 1/4] ci/rtfd: building both fast docs on PR --- .readthedocs.yml | 9 ++++++--- docs/crossroad.html | 10 ++++++++++ docs/rtfd-build.sh | 20 +++++++++++++++----- 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 docs/crossroad.html diff --git a/.readthedocs.yml b/.readthedocs.yml index 5da58d8e65a27..b68b464a4c6d2 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -39,12 +39,15 @@ build: commands: - printenv - pwd ; ls -lh - - pip install -U pip awscli --user + - pip install -U pip awscli py-tree --user - python -m awscli s3 sync --no-sign-request s3://sphinx-packages/ dist/ ; ls -lh dist/ - > - pip install -e . -q -r requirements/pytorch/docs.txt -r _notebooks/.actions/requires.txt \ + pip install -e . -q -r _notebooks/.actions/requires.txt \ + -r requirements/fabric/docs.txt \ + -r requirements/pytorch/docs.txt \ -f 'https://download.pytorch.org/whl/cpu/torch_stable.html' -f dist/ ; pip list # this need to be split so `sphinx-build` is picked from previous installation - bash docs/rtfd-build.sh - - mkdir -p _readthedocs ; mv docs/build/html _readthedocs/html + - cd docs/build ; py-tree --depth_limit=1 + - mkdir -p _readthedocs ; mv docs/build _readthedocs/html diff --git a/docs/crossroad.html b/docs/crossroad.html new file mode 100644 index 0000000000000..2e88bf2dfa09f --- /dev/null +++ b/docs/crossroad.html @@ -0,0 +1,10 @@ + + + + RTFD cross-road + + + + + + diff --git a/docs/rtfd-build.sh b/docs/rtfd-build.sh index 23980b7268b96..b5aafaf19350e 100644 --- a/docs/rtfd-build.sh +++ b/docs/rtfd-build.sh @@ -2,12 +2,22 @@ if ! [ $READTHEDOCS_VERSION == "latest" -o $READTHEDOCS_VERSION == "stable" ]; then - cd ./docs/source-pytorch ; export FAST_DOCS_DEV=1 ; - make html --jobs $(nproc) ; - ls -lh ../build + root=$(pwd) ; + # build Fabric + cd $root/docs/source-fabric ; + make html --jobs $(nproc) ; + cd $root/docs ; + mv build/html build/fabric ; + # build PyTorch + cd $root/docs/source-pytorch ; + make html --jobs $(nproc) ; + cd $root/docs ; + mv build/html build/pytorch ; + # cross-road + cp crossroad.html build/index.html else echo "Void build... :-]" ; - mkdir -p ./docs/build/html - cp ./docs/redirect.html ./docs/build/html/index.html + mkdir -p ./docs/build + cp ./docs/redirect.html ./docs/build/index.html fi From 2032ef8fba78e9e571d1625702340a27ea41a084 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 6 Oct 2023 20:56:01 +0200 Subject: [PATCH 2/4] py_tree --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index b68b464a4c6d2..625c56a5fe61b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -49,5 +49,5 @@ build: pip list # this need to be split so `sphinx-build` is picked from previous installation - bash docs/rtfd-build.sh - - cd docs/build ; py-tree --depth_limit=1 + - cd docs/build ; python -m py_tree --depth_limit=1 - mkdir -p _readthedocs ; mv docs/build _readthedocs/html From 4d4171540212bc1727a51d0be2582dd6c821de84 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 6 Oct 2023 21:06:59 +0200 Subject: [PATCH 3/4] cleaning --- docs/crossroad.html | 5 +++++ docs/rtfd-build.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/crossroad.html b/docs/crossroad.html index 2e88bf2dfa09f..f50d9bd179246 100644 --- a/docs/crossroad.html +++ b/docs/crossroad.html @@ -2,6 +2,11 @@ RTFD cross-road + diff --git a/docs/rtfd-build.sh b/docs/rtfd-build.sh index b5aafaf19350e..5501e0da351b4 100644 --- a/docs/rtfd-build.sh +++ b/docs/rtfd-build.sh @@ -15,6 +15,7 @@ then cd $root/docs ; mv build/html build/pytorch ; # cross-road + rm -rf build/doctrees ; cp crossroad.html build/index.html else echo "Void build... :-]" ; From 40b111e4bf99de8bae545f1b1309a4e4ee92cfe9 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 6 Oct 2023 21:16:57 +0200 Subject: [PATCH 4/4] center --- docs/crossroad.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/crossroad.html b/docs/crossroad.html index f50d9bd179246..0c25930c6343a 100644 --- a/docs/crossroad.html +++ b/docs/crossroad.html @@ -3,8 +3,8 @@ RTFD cross-road