diff --git a/src/python/docs/sphinx/_static/images/1.1.1.png b/src/python/docs/sphinx/ci_script/_static/images/1.1.1.png similarity index 100% rename from src/python/docs/sphinx/_static/images/1.1.1.png rename to src/python/docs/sphinx/ci_script/_static/images/1.1.1.png diff --git a/src/python/docs/sphinx/_static/images/1.1.2.png b/src/python/docs/sphinx/ci_script/_static/images/1.1.2.png similarity index 100% rename from src/python/docs/sphinx/_static/images/1.1.2.png rename to src/python/docs/sphinx/ci_script/_static/images/1.1.2.png diff --git a/src/python/docs/sphinx/_static/images/2.3.000.png b/src/python/docs/sphinx/ci_script/_static/images/2.3.000.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.3.000.png rename to src/python/docs/sphinx/ci_script/_static/images/2.3.000.png diff --git a/src/python/docs/sphinx/_static/images/2.3.4.png b/src/python/docs/sphinx/ci_script/_static/images/2.3.4.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.3.4.png rename to src/python/docs/sphinx/ci_script/_static/images/2.3.4.png diff --git a/src/python/docs/sphinx/_static/images/2.3.5.png b/src/python/docs/sphinx/ci_script/_static/images/2.3.5.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.3.5.png rename to src/python/docs/sphinx/ci_script/_static/images/2.3.5.png diff --git a/src/python/docs/sphinx/_static/images/2.3.6.png b/src/python/docs/sphinx/ci_script/_static/images/2.3.6.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.3.6.png rename to src/python/docs/sphinx/ci_script/_static/images/2.3.6.png diff --git a/src/python/docs/sphinx/_static/images/2.4.1.png b/src/python/docs/sphinx/ci_script/_static/images/2.4.1.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.4.1.png rename to src/python/docs/sphinx/ci_script/_static/images/2.4.1.png diff --git a/src/python/docs/sphinx/_static/images/2.4.2.png b/src/python/docs/sphinx/ci_script/_static/images/2.4.2.png similarity index 100% rename from src/python/docs/sphinx/_static/images/2.4.2.png rename to src/python/docs/sphinx/ci_script/_static/images/2.4.2.png diff --git a/src/python/docs/sphinx/_static/images/DecisionTree.png b/src/python/docs/sphinx/ci_script/_static/images/DecisionTree.png similarity index 100% rename from src/python/docs/sphinx/_static/images/DecisionTree.png rename to src/python/docs/sphinx/ci_script/_static/images/DecisionTree.png diff --git a/src/python/docs/sphinx/_static/images/FDFigure.png b/src/python/docs/sphinx/ci_script/_static/images/FDFigure.png similarity index 100% rename from src/python/docs/sphinx/_static/images/FDFigure.png rename to src/python/docs/sphinx/ci_script/_static/images/FDFigure.png diff --git a/src/python/docs/sphinx/_static/images/ani_1.1.gif b/src/python/docs/sphinx/ci_script/_static/images/ani_1.1.gif similarity index 100% rename from src/python/docs/sphinx/_static/images/ani_1.1.gif rename to src/python/docs/sphinx/ci_script/_static/images/ani_1.1.gif diff --git a/src/python/docs/sphinx/_static/images/customer.png b/src/python/docs/sphinx/ci_script/_static/images/customer.png similarity index 100% rename from src/python/docs/sphinx/_static/images/customer.png rename to src/python/docs/sphinx/ci_script/_static/images/customer.png diff --git a/src/python/docs/sphinx/_static/images/examples.png b/src/python/docs/sphinx/ci_script/_static/images/examples.png similarity index 100% rename from src/python/docs/sphinx/_static/images/examples.png rename to src/python/docs/sphinx/ci_script/_static/images/examples.png diff --git a/src/python/docs/sphinx/_static/images/examples1.png b/src/python/docs/sphinx/ci_script/_static/images/examples1.png similarity index 100% rename from src/python/docs/sphinx/_static/images/examples1.png rename to src/python/docs/sphinx/ci_script/_static/images/examples1.png diff --git a/src/python/docs/sphinx/_static/images/examples2.png b/src/python/docs/sphinx/ci_script/_static/images/examples2.png similarity index 100% rename from src/python/docs/sphinx/_static/images/examples2.png rename to src/python/docs/sphinx/ci_script/_static/images/examples2.png diff --git a/src/python/docs/sphinx/_static/images/examples3.png b/src/python/docs/sphinx/ci_script/_static/images/examples3.png similarity index 100% rename from src/python/docs/sphinx/_static/images/examples3.png rename to src/python/docs/sphinx/ci_script/_static/images/examples3.png diff --git a/src/python/docs/sphinx/_static/images/examples4.png b/src/python/docs/sphinx/ci_script/_static/images/examples4.png similarity index 100% rename from src/python/docs/sphinx/_static/images/examples4.png rename to src/python/docs/sphinx/ci_script/_static/images/examples4.png diff --git a/src/python/docs/sphinx/_static/images/supported_version.png b/src/python/docs/sphinx/ci_script/_static/images/supported_version.png similarity index 100% rename from src/python/docs/sphinx/_static/images/supported_version.png rename to src/python/docs/sphinx/ci_script/_static/images/supported_version.png diff --git a/src/python/docs/sphinx/_static/images/table_car.png b/src/python/docs/sphinx/ci_script/_static/images/table_car.png similarity index 100% rename from src/python/docs/sphinx/_static/images/table_car.png rename to src/python/docs/sphinx/ci_script/_static/images/table_car.png diff --git a/src/python/docs/sphinx/_static/mystyle.css b/src/python/docs/sphinx/ci_script/_static/mystyle.css similarity index 100% rename from src/python/docs/sphinx/_static/mystyle.css rename to src/python/docs/sphinx/ci_script/_static/mystyle.css diff --git a/src/python/docs/sphinx/metrics.rst b/src/python/docs/sphinx/concepts/metrics.rst similarity index 100% rename from src/python/docs/sphinx/metrics.rst rename to src/python/docs/sphinx/concepts/metrics.rst diff --git a/src/python/docs/sphinx/installationguide.rst b/src/python/docs/sphinx/installationguide.rst index 6a6042a1..fec695d6 100644 --- a/src/python/docs/sphinx/installationguide.rst +++ b/src/python/docs/sphinx/installationguide.rst @@ -8,7 +8,7 @@ Installation Guide Supported Platforms ------------------- -Release 0.6: +Release 1.1: * Windows 10, Ubuntu 14.04, Ubuntu 16.04, CentOS 7, RHEL 7, Mac OS 10.11, 10.12, 10.13 diff --git a/src/python/docs/sphinx/make.bat b/src/python/docs/sphinx/make.bat index 248fa3fe..50b8b4ee 100644 --- a/src/python/docs/sphinx/make.bat +++ b/src/python/docs/sphinx/make.bat @@ -1,20 +1,21 @@ @ECHO OFF pushd %~dp0 -set PYTHONINTERPRETER=%~dp0..\..\..\..\dependencies\Python3.7\python.exe -set PYTHONPATH=%~dp0..\..\..\..\Python\ +set PYTHONINTERPRETER=%~dp0..\..\..\..\dependencies\Python3.6\python.exe set SPHINXOPTS=-j 4 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=%PYTHONINTERPRETER% -msphinx + set SPHINXBUILD=%PYTHONINTERPRETER% -m sphinx ) + +:: Todo: Fix the issue here, the installtion guide is not showing correctly set SOURCEDIR=. -set BUILDDIR=_build +set BUILDDIR=%~dp0_build set SPHINXPROJ=microsoftml -if "%1" == "" goto html: +if "%1" == "" goto html: set format=%1 goto next: @@ -24,8 +25,8 @@ set format=html :next: @echo remove %BUILDDIR%\%format% -rmdir /s /q %BUILDDIR%\doctrees -rmdir /s /q %BUILDDIR%\%format% +call rmdir /s /q %BUILDDIR%\doctrees +call rmdir /s /q %BUILDDIR%\%format% if exist %BUILDDIR%\_static rmdir /S /Q %BUILDDIR%\_static if exist %BUILDDIR%\%format% goto issue: @@ -42,15 +43,15 @@ if errorlevel 9009 ( exit /b 1 ) -%SPHINXBUILD% -M %format% %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +call %SPHINXBUILD% -M %format% %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +call %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end: :issue: @echo An issue happened. Check %BUILDDIR%\%format% is not here. :end -popd +popd \ No newline at end of file diff --git a/src/python/docs/sphinx/make_md.bat b/src/python/docs/sphinx/make_md.bat deleted file mode 100644 index 5d26abee..00000000 --- a/src/python/docs/sphinx/make_md.bat +++ /dev/null @@ -1,2 +0,0 @@ -CALL make md -python ci_script\fix_apiguide.py diff --git a/src/python/docs/sphinx/make_yaml.bat b/src/python/docs/sphinx/make_yaml.bat index e427e150..2e06efb1 100644 --- a/src/python/docs/sphinx/make_yaml.bat +++ b/src/python/docs/sphinx/make_yaml.bat @@ -1,34 +1,87 @@ -@ECHO ON -set PY=%~dp0..\..\..\..\dependencies\Python3.7\python.exe -set PYS=%~dp0..\..\..\..\dependencies\Python3.7\Scripts +@if not defined _echo @echo off +if exist %~dp0build (rmdir /S /Q %~dp0build) +if exist %~dp0..\..\..\..\dependencies\Python3.6 ( +echo "Python3.6 exists" +) else ( +echo "Please run build.cmd under NimbusML with Python3.6's configuration first" +call exit /b +) +echo "###Downloading Dependencies######" +echo "Downloading Dependencies " +set PY=%~dp0..\..\..\..\dependencies\Python3.6\python.exe set PYTHONPATH=%~dp0..\..\..\..\python -%PYS%\pip install sphinx==1.5.5 -%PYS%\pip install sphinx-docfx-yaml -%PYS%\pip install sphinx_rtd_theme -%PYS%\sphinx-build -c ci_script . _build +call %PY% -m pip -q install pip==9.0.3 +echo "Installing sphinx-docfx-yaml " +call %PY% -m pip -q install sphinx-docfx-yaml +echo "Installing sphinx " +call %PY% -m pip -q install sphinx==2.1.1 +echo "Installing sphinx_rtd_theme " +call %PY% -m pip -q install sphinx_rtd_theme +echo "Installing NimbusML " +call %PY% -m pip -q install nimbusml +echo "#################################" +echo. -if exist _build del /Q _build +echo. +echo "#################################" +echo "Running sphinx-build " +echo "#################################" +call %PY% -m sphinx -c %~dp0ci_script %~dp0 %~dp0_build -mkdir _build\ms_doc_ref\ -xcopy /S /I /Q /Y /F _build\docfx_yaml\* _build\ms_doc_ref\nimbusml\docs-ref-autogen -del _build\ms_doc_ref\nimbusml\docs-ref-autogen\toc.yml +echo. +echo "#################################" +echo "Copying files " +echo "#################################" +call mkdir %~dp0_build\ms_doc_ref\ +call xcopy /S /I /Q /Y /F %~dp0_build\docfx_yaml\* %~dp0_build\ms_doc_ref\nimbusml\docs-ref-autogen -%PYS%\pip install sphinx==1.6.2 -CALL make_md.bat +echo. +echo "#################################" +echo "Running make_md.bat" +echo "Fixing API guide +echo "#################################" +call make md +call %py% %~dp0ci_script\fix_apiguide.py -copy /Y toc.yml _build\ms_doc_ref\nimbusml\toc.yml -xcopy /Y /S _build\md\* _build\ms_doc_ref\nimbusml +call copy /Y %~dp0toc.yml %~dp0_build\ms_doc_ref\nimbusml\toc.yml +call xcopy /Y /S %~dp0_build\md\* %~dp0_build\ms_doc_ref\nimbusml +:: Append the text in index.md under tutorial.md -del _build\ms_doc_ref\nimbusml\doc-warnings-rx.log -del _build\ms_doc_ref\nimbusml\doc-warnings-rx-all.log -del _build\ms_doc_ref\nimbusml\tutorial.md +echo. +echo "#################################" +echo "updating yml......." +echo "#################################" +call %PY% %~dp0ci_script\gen_toc_yml.py -input %~dp0_build\ms_doc_ref\nimbusml\index.md -temp %~dp0_build\ms_doc_ref\nimbusml\toc_ref.yml -output %~dp0_build\ms_doc_ref\nimbusml\toc.yml -echo updating yml... -%PY% ci_script\gen_toc_yml.py -input _build\ms_doc_ref\nimbusml\index.md -temp _build\ms_doc_ref\nimbusml\toc_ref.yml -output _build\ms_doc_ref\nimbusml\toc.yml +echo. +echo "#################################" +echo "updating reference links...." +echo "#################################" +call %PY% %~dp0ci_script\update_all_toc_yml.py -echo updating reference links.... -%PY% ci_script\update_all_toc_yml.py +echo. +echo "#################################" +echo "updating ms-scikit.md to modules.md" +echo "#################################" +call move %~dp0_build\ms_doc_ref\nimbusml\modules.md %~dp0_build\ms_doc_ref\nimbusml\ms-scikit.md -echo updating ms-scikit.md to modules.md -del _build\ms_doc_ref\nimbusml\ms-scikit.md -mv _build\ms_doc_ref\nimbusml\modules.md _build\ms_doc_ref\nimbusml\ms-scikit.md \ No newline at end of file +echo. +echo "#################################" +echo "Cleaning files" +echo "#################################" +call mkdir %~dp0_build\ms_doc_ref\nimbusml\_images\_static +call xcopy /S /I /Q /Y /F %~dp0ci_script\_static %~dp0_build\ms_doc_ref\nimbusml\_images\_static +call mkdir %~dp0build +call move %~dp0_build\ms_doc_ref %~dp0\build\ +call more +29 %~dp0build\ms_doc_ref\nimbusml\index.md >> %~dp0build\ms_doc_ref\nimbusml\overview.md +call del /Q %~dp0build\ms_doc_ref\nimbusml\*log +call del /Q %~dp0build\ms_doc_ref\nimbusml\concepts.md +call del /Q %~dp0build\ms_doc_ref\nimbusml\index.md +call del /Q %~dp0build\ms_doc_ref\nimbusml\toc.yml +call rmdir /Q %~dp0build\ms_doc_ref\nimbusml\_static +:: call rmdir /S /Q %~dp0_build + +echo. +echo "#################################" +echo "#########Built Finished##########" +echo "#################################" \ No newline at end of file