From ca1eb1e94280a7b0525e14817bc39498666c1cbe Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 11:20:42 +0200 Subject: [PATCH 01/17] [docs] upgrade sphinx and book theme Signed-off-by: Max Pumperla --- doc/requirements-doc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index d1792bb49b20..3c3f89d8569a 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -49,14 +49,14 @@ git+https://github.com/ray-project/ray_lightning@main#ray_lightning Pygments==2.13.0 # Sphinx -sphinx==4.3.2 +sphinx==6.2.1 sphinx-click==3.0.2 sphinx-copybutton==0.4.0 sphinxemoji==0.2.0 sphinx-jsonschema==1.17.2 sphinx-panels==0.6.0 sphinx-version-warning==1.1.2 -sphinx-book-theme==0.3.3 +sphinx-book-theme==1.0.1 sphinx-external-toc==0.2.4 sphinx-sitemap==2.2.0 sphinxcontrib-redoc==1.6.0 From a0d51ed3c000bd3aae2f0fc9a8c77605fcb191e5 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 11:58:01 +0200 Subject: [PATCH 02/17] change base image Signed-off-by: Max Pumperla --- .readthedocs.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000000..24b7bde346c5 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,6 @@ +version: 2 + +build: + os: "ubuntu-20.04" + tools: + python: "3.8" \ No newline at end of file From 222634fdb5c79a4b5cf2d4ce097a78cbb18133d6 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 12:02:57 +0200 Subject: [PATCH 03/17] rm tabs, add pyyaml Signed-off-by: Max Pumperla --- doc/requirements-doc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 3c3f89d8569a..cf365b3db22b 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -54,7 +54,6 @@ sphinx-click==3.0.2 sphinx-copybutton==0.4.0 sphinxemoji==0.2.0 sphinx-jsonschema==1.17.2 -sphinx-panels==0.6.0 sphinx-version-warning==1.1.2 sphinx-book-theme==1.0.1 sphinx-external-toc==0.2.4 @@ -73,4 +72,5 @@ myst-nb==0.13.1 jupytext==1.13.6 # Pin urllib to avoid downstream ssl incompatibility issues -urllib3 < 1.27 \ No newline at end of file +urllib3 < 1.27 +pyyaml==6.0 \ No newline at end of file From 7839777607fc6757403dca03d6cc68bf772a1995 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 12:03:45 +0200 Subject: [PATCH 04/17] whitespace Signed-off-by: Max Pumperla --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 24b7bde346c5..3b57618bde83 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,4 +3,4 @@ version: 2 build: os: "ubuntu-20.04" tools: - python: "3.8" \ No newline at end of file + python: "3.8" From 03044458d610b6c755f02a6bedbd7ee75baa2b07 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 12:13:56 +0200 Subject: [PATCH 05/17] downgrade sphinx a bit Signed-off-by: Max Pumperla --- doc/requirements-doc.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index cf365b3db22b..09d8e8433853 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -49,14 +49,14 @@ git+https://github.com/ray-project/ray_lightning@main#ray_lightning Pygments==2.13.0 # Sphinx -sphinx==6.2.1 +sphinx==5.3.0 # upgrade to 6.2.1 later, and ultimately 7.x sphinx-click==3.0.2 sphinx-copybutton==0.4.0 sphinxemoji==0.2.0 sphinx-jsonschema==1.17.2 sphinx-version-warning==1.1.2 sphinx-book-theme==1.0.1 -sphinx-external-toc==0.2.4 +sphinx-external-toc==0.3.1 sphinx-sitemap==2.2.0 sphinxcontrib-redoc==1.6.0 sphinx-tabs==3.4.0 @@ -73,4 +73,7 @@ jupytext==1.13.6 # Pin urllib to avoid downstream ssl incompatibility issues urllib3 < 1.27 -pyyaml==6.0 \ No newline at end of file +PyYAML==6.0 + +# TODO: https://github.com/executablebooks/sphinx-external-toc/issues/90 +# needs to be fixed to upgrade to sphinx >= 6.0.0 \ No newline at end of file From e394b173634602672e20e3ebd2ae8883b717b2b5 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 13:40:20 +0200 Subject: [PATCH 06/17] manually add deps path Signed-off-by: Max Pumperla --- .readthedocs.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3b57618bde83..292ca06f3de3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,3 +4,10 @@ build: os: "ubuntu-20.04" tools: python: "3.8" + +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: docs/requirements-doc.txt \ No newline at end of file From ebf8191ba9b635b929731a27a7034bb77595802b Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 15:43:09 +0200 Subject: [PATCH 07/17] fix path Signed-off-by: Max Pumperla --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 292ca06f3de3..d298f35ea4a1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,4 +10,4 @@ sphinx: python: install: - - requirements: docs/requirements-doc.txt \ No newline at end of file + - requirements: doc/requirements-doc.txt \ No newline at end of file From 3050a5cf95a6a5df21a88d4384bdb54ec674510a Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:01:55 +0200 Subject: [PATCH 08/17] update deps Signed-off-by: Max Pumperla --- doc/Makefile | 4 ++-- doc/requirements-doc.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 8e819ce54b7b..278ad6e9fe18 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -52,12 +52,12 @@ clean: rm -rf $(BUILDDIR)/* html: - $(SPHINXBUILD) -W --keep-going -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) -j 4 -W --keep-going -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." develop: - FAST=True $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + FAST=True $(SPHINXBUILD) -j 4 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "View the documentation by opening a browser and going to $(BUILDDIR)/html/index.html." diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 09d8e8433853..265597bc5d02 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -65,8 +65,8 @@ autodoc_pydantic==1.6.1 sphinx_design==0.4.1 # MyST -myst-parser==0.15.2 -myst-nb==0.13.1 +myst-parser==1.0.0 +myst-nb==0.17.2 # Jupyter conversion jupytext==1.13.6 From c517e4bd1a956e16e40b50405598bfe6da2e164b Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:11:37 +0200 Subject: [PATCH 09/17] fix final deps for install Signed-off-by: Max Pumperla --- doc/requirements-doc.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 265597bc5d02..7767ec29700e 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -49,6 +49,8 @@ git+https://github.com/ray-project/ray_lightning@main#ray_lightning Pygments==2.13.0 # Sphinx +# TODO: https://github.com/executablebooks/sphinx-external-toc/issues/90 +# needs to be fixed to upgrade to sphinx >= 6.0.0 sphinx==5.3.0 # upgrade to 6.2.1 later, and ultimately 7.x sphinx-click==3.0.2 sphinx-copybutton==0.4.0 @@ -65,7 +67,7 @@ autodoc_pydantic==1.6.1 sphinx_design==0.4.1 # MyST -myst-parser==1.0.0 +myst-parser==0.18.0 # migrate to 1.0.0 once myst-nb is updated and allows it myst-nb==0.17.2 # Jupyter conversion @@ -73,7 +75,3 @@ jupytext==1.13.6 # Pin urllib to avoid downstream ssl incompatibility issues urllib3 < 1.27 -PyYAML==6.0 - -# TODO: https://github.com/executablebooks/sphinx-external-toc/issues/90 -# needs to be fixed to upgrade to sphinx >= 6.0.0 \ No newline at end of file From 0ce6936b87e827feae3cfcef6e7124105ab5a31d Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:21:30 +0200 Subject: [PATCH 10/17] rm old bat file Signed-off-by: Max Pumperla --- doc/make.bat | 263 --------------------------------------------------- 1 file changed, 263 deletions(-) delete mode 100644 doc/make.bat diff --git a/doc/make.bat b/doc/make.bat deleted file mode 100644 index 8f863202ed2b..000000000000 --- a/doc/make.bat +++ /dev/null @@ -1,263 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. xml to make Docutils-native XML files - echo. pseudoxml to make pseudoxml-XML files for display purposes - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - echo. coverage to run coverage check of the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - - -REM Check if sphinx-build is available and fallback to Python version if any -%SPHINXBUILD% 2> nul -if errorlevel 9009 goto sphinx_python -goto sphinx_ok - -:sphinx_python - -set SPHINXBUILD=python -m sphinx.__init__ -%SPHINXBUILD% 2> nul -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -:sphinx_ok - - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Ray.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Ray.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdf" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -if "%1" == "coverage" ( - %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage - if errorlevel 1 exit /b 1 - echo. - echo.Testing of coverage in the sources finished, look at the ^ -results in %BUILDDIR%/coverage/python.txt. - goto end -) - -if "%1" == "xml" ( - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The XML files are in %BUILDDIR%/xml. - goto end -) - -if "%1" == "pseudoxml" ( - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. - goto end -) - -:end From 83234ca79a9fea925b9ac7eeb85c2ce1992fd298 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:21:50 +0200 Subject: [PATCH 11/17] rm pickle due to python 3.8 Signed-off-by: Max Pumperla --- doc/requirements-doc.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 7767ec29700e..569b0511520e 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -18,7 +18,6 @@ mock numpy scikit-image pandas -pickle5 pillow pyarrow pydantic < 1.10.0 From 211914715cca7f4d168d84a655f0f5f38a9ccf0a Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:22:06 +0200 Subject: [PATCH 12/17] simplify Makefile Signed-off-by: Max Pumperla --- doc/Makefile | 135 ++------------------------------------------------- 1 file changed, 4 insertions(+), 131 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 278ad6e9fe18..32f490ddf28d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,4 @@ # Makefile for Sphinx documentation -# # You can set these variables from the command line. SPHINXOPTS = @@ -19,31 +18,13 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext +.PHONY: help clean html develop linkcheck doctest coverage help: @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " clean to remove all build files" + @echo " html to build the documentation as HTML, as in production" + @echo " develop to build the documentation as HTML, for quick development" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" @@ -62,110 +43,12 @@ develop: @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "View the documentation by opening a browser and going to $(BUILDDIR)/html/index.html." -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Ray.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Ray.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/Ray" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Ray" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @@ -186,13 +69,3 @@ coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." From 528fa447a7945703662b7c9b0330c55d920eb8b8 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:22:23 +0200 Subject: [PATCH 13/17] add target language explicitly Signed-off-by: Max Pumperla --- doc/source/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 49624d214126..f61908dd5796 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -269,6 +269,9 @@ # " v documentation". html_title = f"Ray {release}" +language = 'en' + + # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None From 2a74cbaed4f694598c102fe2b6da393ed2d28352 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:28:59 +0200 Subject: [PATCH 14/17] further simplify config Signed-off-by: Max Pumperla --- doc/README.md | 13 ------- doc/source/conf.py | 91 +++++----------------------------------------- 2 files changed, 10 insertions(+), 94 deletions(-) diff --git a/doc/README.md b/doc/README.md index bd131b119273..9f086b28affe 100644 --- a/doc/README.md +++ b/doc/README.md @@ -22,19 +22,6 @@ make develop && open _build/html/index.html > **_NOTE:_** The above command is for development. To reproduce build failures from the > CI, you should use `make html` which is the same as `make develop` but treats warnings as errors. -## Building just one sub-project - -Often your changes in documentation just concern one sub-project, such as Tune or Train. -To build just this one sub-project, and ignore the rest -(leading to build warnings due to broken references etc.), run the following command: - -```shell -DOC_LIB= sphinx-build -b html -d _build/doctrees source _build/html -``` -where `` is the name of the sub-project and can be any of the docs projects in the `source/` -directory either called `tune`, `rllib`, `train`, `cluster`, `serve`, `data` or the ones starting -with `ray-`, e.g. `ray-observability`. - ## Announcements and includes To add new announcements and other messaging to the top or bottom of a documentation page, diff --git a/doc/source/conf.py b/doc/source/conf.py index f61908dd5796..d2d095300f0f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -140,17 +140,16 @@ FORUM_LINK = "https://discuss.ray.io" versionwarning_messages = { - # Re-enable this after Ray Summit. - # "latest": ( - # "This document is for the latest pip release. " - # 'Visit the master branch documentation here.' - # ), - # "master": ( - # "Got questions? Join " - # f'the Ray Community forum ' - # "for Q&A on all things Ray, as well as to share and learn use cases " - # "and best practices with the Ray community." - # ), + "latest": ( + "This document is for the latest pip release. " + 'Visit the master branch documentation here.' + ), + "master": ( + "Got questions? Join " + f'the Ray Community forum ' + "for Q&A on all things Ray, as well as to share and learn use cases " + "and best practices with the Ray community." + ), } versionwarning_body_selector = "#main-content" @@ -158,9 +157,6 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] -# The encoding of source files. -# source_encoding = 'utf-8-sig' - # The master toctree document. master_doc = "index" @@ -174,11 +170,8 @@ # built documents. from ray import __version__ as version -# The full version, including alpha/beta/rc tags. release = version -language = None - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # Also helps resolve warnings about documents not included in any toctree. @@ -186,28 +179,9 @@ "templates/*", ] -# If "DOC_LIB" is found, only build that top-level navigation item. -build_one_lib = os.getenv("DOC_LIB") - -all_toc_libs = [f.path for f in os.scandir(".") if f.is_dir() and "ray-" in f.path] -all_toc_libs += [ - "cluster", - "tune", - "data", - "train", - "rllib", - "serve", - "workflows", -] -if build_one_lib and build_one_lib in all_toc_libs: - all_toc_libs.remove(build_one_lib) - exclude_patterns += all_toc_libs - - # The name of the Pygments (syntax highlighting) style to use. pygments_style = "lovelace" - # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False @@ -271,58 +245,13 @@ language = 'en' - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. html_favicon = "_static/favicon.ico" -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] - # Output file base name for HTML help builder. htmlhelp_basename = "Raydoc" -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', -} - -latex_documents = [ - (master_doc, "Ray.tex", "Ray Documentation", author, "manual"), -] - -# -- Options for manual page output --------------------------------------- - -man_pages = [(master_doc, "ray", "Ray Documentation", [author], 1)] - -# -- Options for Texinfo output ------------------------------------------- -texinfo_documents = [ - ( - master_doc, - "Ray", - "Ray Documentation", - author, - "Ray", - "Ray provides a simple, universal API for building distributed applications.", - "Miscellaneous", - ), -] - # Python methods should be presented in source code order autodoc_member_order = "bysource" From 75b8ae2a0e195a1dd87f54d84fa4fb173e059a6b Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:36:45 +0200 Subject: [PATCH 15/17] fix conf path Signed-off-by: Max Pumperla --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d298f35ea4a1..bf7caeaa1d8c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,7 +6,7 @@ build: python: "3.8" sphinx: - configuration: docs/conf.py + configuration: doc/source/conf.py python: install: From c4f9cc67f8103623513d6c9ededd5813dbb1f2e4 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Fri, 5 May 2023 16:44:09 +0200 Subject: [PATCH 16/17] rm panels Signed-off-by: Max Pumperla --- doc/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index d2d095300f0f..0ce331b4dd95 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -56,7 +56,6 @@ "sphinxcontrib.redoc", "sphinx_tabs.tabs", "sphinx_remove_toctrees", - "sphinx_panels", "sphinx_design", ] From c7ae5b1d3f0d47cf5e57be85bd7ff8aec02dbd64 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Wed, 10 May 2023 16:27:43 +0200 Subject: [PATCH 17/17] bump Signed-off-by: Max Pumperla --- doc/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6c28e99a3bfb..41ff0fa7898c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -59,6 +59,7 @@ "sphinx_design", ] + # Prune deep toc-trees on demand for smaller html and faster builds. # This only effects the navigation bar, not the content. if os.getenv("FAST", False):