From eaa5110db75dd805ed0884eb66cd4d3343157f66 Mon Sep 17 00:00:00 2001 From: Yuwen Hu <54161268+Oscilloscope98@users.noreply.github.com> Date: Tue, 15 Nov 2022 10:00:49 +0800 Subject: [PATCH] [Doc] Migrate requirements file for ReadtheDocs documentation building (#6602) * Refactor readthedocs yml file to wget requirements-doc.txt for safety purposes * Remove requirements-doc.txt from BigDL repo * temp readme * Remove requirements-rtd.txt and update README for local doc build * Small typo fix --- .readthedocs.yml | 12 +++++++- docs/readthedocs/README.md | 11 +++++-- docs/readthedocs/requirements-doc.txt | 44 --------------------------- docs/readthedocs/requirements-rtd.txt | 9 ------ 4 files changed, 19 insertions(+), 57 deletions(-) delete mode 100644 docs/readthedocs/requirements-doc.txt delete mode 100644 docs/readthedocs/requirements-rtd.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 66ed4500..56854173 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,9 +5,19 @@ # Required version: 2 +build: + os: ubuntu-20.04 + tools: + python: "3.7" + apt_packages: + - graphviz + jobs: + pre_install: + - wget https://raw.githubusercontent.com/analytics-zoo/BigDL/main/python/test/python-requirements/requirements-doc.txt + sphinx: configuration: docs/readthedocs/source/conf.py python: install: - - requirements: docs/readthedocs/requirements-doc.txt + - requirements: ./requirements-doc.txt diff --git a/docs/readthedocs/README.md b/docs/readthedocs/README.md index 8c2d8b2b..a687780c 100644 --- a/docs/readthedocs/README.md +++ b/docs/readthedocs/README.md @@ -12,11 +12,16 @@ conda activate docs Then inside [`BigDL/docs/readthedocs`](.) folder, install required packages: ```bash -pip install --upgrade -r requirements-rtd.txt +cd docs/readthedocs +# for reproducing ReadtheDocs deployment environment +pip install --upgrade pip "setuptools<58.3.0" +pip install --upgrade pillow mock==1.0.1 "alabaster>=0.7,<0.8,!=0.7.5" commonmark==0.9.1 recommonmark==0.5.0 sphinx sphinx-rtd-theme "readthedocs-sphinx-ext<2.3" + +# for other documentation related dependencies +wget https://raw.githubusercontent.com/analytics-zoo/BigDL/main/python/test/python-requirements/requirements-doc.txt pip install -r requirements-doc.txt ``` -> **Note**: `requirements-rtd.txt` is for reproducing ReadtheDocs deployment environment. No need to modify this file when adding new sphinx extension for our documentation. New packages should be added in `requirements-doc.txt`. - +> **Note**: When adding new sphinx extensions for our documentation, the requirements file located [here](https://github.com/analytics-zoo/BigDL/blob/main/python/test/python-requirements/requirements-doc.txt) should be modified. ### 2. Build the documentation You can then build the documentation locally through: ```bash diff --git a/docs/readthedocs/requirements-doc.txt b/docs/readthedocs/requirements-doc.txt deleted file mode 100644 index 8dbd8e27..00000000 --- a/docs/readthedocs/requirements-doc.txt +++ /dev/null @@ -1,44 +0,0 @@ -sphinx-copybutton==0.5.0 -sphinx-version-warning==1.1.2 -sphinx-click==4.3.0 -sphinx-jsonschema==1.19.1 -sphinxemoji==0.2.0 -click==8.1.3 -markdown<3.4 -tensorflow==1.15.2 -bigdl==0.12.0 -cloudpickle==2.1.0 -ray[tune]==1.9.2 -ray==1.9.2 -torch==1.11.0 -Pygments==2.7 -setuptools==41.0.1 -docutils==0.17.1 -mock==1.0.1 -pillow==5.4.1 -sphinx==4.5.0 -alabaster>=0.7,<0.8,!=0.7.5 -commonmark==0.8.1 -recommonmark==0.5.0 -readthedocs-sphinx-ext<2.2 -scikit-learn==1.0.2 -pystan==2.19.1.1 -prophet==1.0.1 -pmdarima==1.8.5 -sphinx_markdown_tables==0.0.15 -numpy==1.21.2 -xgboost==1.6.1 -torchmetrics==0.7.2 -pickle5==0.0.12 -protobuf~=3.19.0 -sphinx-tabs==3.4 -optuna==2.10.0 -ConfigSpace==0.5.0 -sphinx-design==0.2.0 -sphinx-external-toc==0.3.0 -nbsphinx==0.8.9 -ipython==7.34.0 -sphinx-design==0.2.0 -nbsphinx-link==1.3.0 -pydata-sphinx-theme==0.11.0 -sphinxcontrib-mermaid==0.7.1 \ No newline at end of file diff --git a/docs/readthedocs/requirements-rtd.txt b/docs/readthedocs/requirements-rtd.txt deleted file mode 100644 index 9e1c4005..00000000 --- a/docs/readthedocs/requirements-rtd.txt +++ /dev/null @@ -1,9 +0,0 @@ -setuptools<58.3.0 -pillow -mock==1.0.1 -alabaster>=0.7,<0.8,!=0.7.5 -commonmark==0.9.1 -recommonmark==0.5.0 -sphinx -sphinx-rtd-theme -readthedocs-sphinx-ext<2.2 \ No newline at end of file