From 67089bc66afdd9f7908cfa2ff902e834d80590ec Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Thu, 28 Jan 2021 11:10:59 -0800 Subject: [PATCH] Updated Docs requirements --- .github/workflows/tests.yml | 8 ----- .readthedocs.yml | 16 +++++++++ Makefile | 13 +++++++ rsts/requirements.in => doc-requirements.in | 0 rsts/requirements.txt => doc-requirements.txt | 14 ++++---- rsts/Makefile | 3 ++ rsts/conf.py | 2 +- rsts/make.bat | 36 ------------------- 8 files changed, 40 insertions(+), 52 deletions(-) create mode 100644 .readthedocs.yml rename rsts/requirements.in => doc-requirements.in (100%) rename rsts/requirements.txt => doc-requirements.txt (89%) delete mode 100644 rsts/make.bat diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 041b02e88d..b11d184b82 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,3 @@ jobs: echo "current-context:" $(kubectl config current-context) echo "environment-kubeconfig:" ${KUBECONFIG} make end2end_execute - docs: - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - steps: - - uses: actions/checkout@v1 - - name: Build docs - run: make generate-docs diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000000..1b9e1708eb --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,16 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: rsts/conf.py + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.8 + install: + - requirements: doc-requirements.txt diff --git a/Makefile b/Makefile index 6828360adc..6edbb8304e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +define PIP_COMPILE +pip-compile $(1) --upgrade --verbose +endef + .PHONY: kustomize kustomize: KUSTOMIZE_VERSION=3.8.4 bash script/generate_kustomize.sh @@ -30,3 +34,12 @@ generate-docs: generate-dependent-repo-docs .PHONY: generate-dependent-repo-docs generate-dependent-repo-docs: @FLYTEKIT_VERSION=0.15.4 FLYTEIDL_VERSION=0.18.11 ./script/update_ref_docs.sh + +.PHONY: install-piptools +install-piptools: + pip install -U pip-tools + +.PHONY: doc-requirements.txt +doc-requirements.txt: doc-requirements.in install-piptools + $(call PIP_COMPILE,doc-requirements.in) + diff --git a/rsts/requirements.in b/doc-requirements.in similarity index 100% rename from rsts/requirements.in rename to doc-requirements.in diff --git a/rsts/requirements.txt b/doc-requirements.txt similarity index 89% rename from rsts/requirements.txt rename to doc-requirements.txt index 529c8bc184..4623f05504 100644 --- a/rsts/requirements.txt +++ b/doc-requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile # To update, run: # -# make requirements.txt +# pip-compile doc-requirements.in # alabaster==0.7.12 # via sphinx @@ -61,18 +61,18 @@ snowballstemmer==2.1.0 soupsieve==2.1 # via beautifulsoup4 sphinx-autoapi==1.6.0 - # via -r requirements.in + # via -r doc-requirements.in sphinx-code-include==1.1.1 - # via -r requirements.in + # via -r doc-requirements.in sphinx-copybutton==0.3.1 - # via -r requirements.in + # via -r doc-requirements.in sphinx-material==0.0.32 - # via -r requirements.in + # via -r doc-requirements.in sphinx-prompt==1.3.0 - # via -r requirements.in + # via -r doc-requirements.in sphinx==3.4.3 # via - # -r requirements.in + # -r doc-requirements.in # sphinx-autoapi # sphinx-code-include # sphinx-copybutton diff --git a/rsts/Makefile b/rsts/Makefile index a761edf1c9..d06c8c4804 100644 --- a/rsts/Makefile +++ b/rsts/Makefile @@ -18,3 +18,6 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + + + diff --git a/rsts/conf.py b/rsts/conf.py index 6aad5452a8..e239fd4568 100644 --- a/rsts/conf.py +++ b/rsts/conf.py @@ -98,7 +98,7 @@ # a list of builtin themes. # html_logo = "flyte_lockup_on_dark.png" -html_static_path = ['_static'] +html_static_path = [] html_theme = "sphinx_material" html_theme_options = { # Set the name of the project to appear in the navigation. diff --git a/rsts/make.bat b/rsts/make.bat deleted file mode 100644 index 47d656bb74..0000000000 --- a/rsts/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build -set SPHINXPROJ=simpleble - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 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 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd