From 8696de241ac86e527dae8168068cceafd41fb247 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 16:27:58 +0000 Subject: [PATCH 1/7] Tried changing the location of the apidoc compilation --- doc/conf.py | 4 +- doc/make.bat | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 doc/make.bat diff --git a/doc/conf.py b/doc/conf.py index 80cd5602..bd8420c4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -288,5 +288,5 @@ epub_copyright = u'2013, Author' on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: - os.system("sphinx-apidoc -f -o . ../GPy") -#sphinx-apidoc . -o doc -H 'GPy' -f + os.system("pwd") + os.system("sphinx-apidoc -f -o . ../") diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 00000000..40a74901 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,190 @@ +@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. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in 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 +) + +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\GPy.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\GPy.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" == "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 +) + +:end From e061e1a638a22f4d00b5c63e86fb3e2d71656d02 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 16:33:59 +0000 Subject: [PATCH 2/7] Tried fixing build call --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index bd8420c4..fa6f8c34 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -289,4 +289,4 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: os.system("pwd") - os.system("sphinx-apidoc -f -o . ../") + os.system("sphinx-apidoc -f -o . ./GPy") From b64d6e4acfdca47b23d57741a4977b7b9e1b93d6 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 16:36:08 +0000 Subject: [PATCH 3/7] The below again --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index fa6f8c34..cf9f7ca7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -289,4 +289,4 @@ on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: os.system("pwd") - os.system("sphinx-apidoc -f -o . ./GPy") + os.system("sphinx-apidoc -f -o . ../GPy") From 3045ee72c8c6049e5adc90e43840a9685329e5f8 Mon Sep 17 00:00:00 2001 From: Neil Lawrence Date: Fri, 18 Jan 2013 16:38:41 +0000 Subject: [PATCH 4/7] Added unsupervised.py examples file and datasets.py@ --- GPy/examples/unsupervised.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 GPy/examples/unsupervised.py diff --git a/GPy/examples/unsupervised.py b/GPy/examples/unsupervised.py new file mode 100644 index 00000000..08d81e05 --- /dev/null +++ b/GPy/examples/unsupervised.py @@ -0,0 +1,25 @@ +""" +Usupervised learning with Gaussian Processes. +""" +import pylab as pb +import numpy as np +import GPy + + +###################################### +## Oil data subsampled to 100 points. +def oil_100(): + data = GPy.util.datasets.oil_100() + + # create simple GP model + m = GPy.models.GPLVM(data['X'], 2) + + + # optimize + m.ensure_default_constraints() + m.optimize() + + # plot + print(m) + return m + From 08ecb2f97f40272a1598f8cc46553ab92c15d6e8 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 16:41:18 +0000 Subject: [PATCH 5/7] Added pylab to requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ee44dde0..4934e072 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup(name = 'GPy', long_description=read('README.md'), #ext_modules = [Extension(name = 'GPy.kern.lfmUpsilonf2py', # sources = ['GPy/kern/src/lfmUpsilonf2py.f90'])], - install_requires=['numpy>=1.6', 'scipy','matplotlib>=1.1'], + install_requires=['pylab, numpy>=1.6', 'scipy','matplotlib>=1.1'], setup_requires=['sphinx'], cmdclass = {'build_sphinx': BuildDoc}, classifiers=[ From e4e05ea5e5082a73b8e018ee54867b612d0898a7 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 17:05:57 +0000 Subject: [PATCH 6/7] Trying to give pylab dependency --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4934e072..b8b8b24b 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup(name = 'GPy', long_description=read('README.md'), #ext_modules = [Extension(name = 'GPy.kern.lfmUpsilonf2py', # sources = ['GPy/kern/src/lfmUpsilonf2py.f90'])], - install_requires=['pylab, numpy>=1.6', 'scipy','matplotlib>=1.1'], + install_requires=['pylab', 'numpy>=1.6', 'scipy','matplotlib>=1.1'], setup_requires=['sphinx'], cmdclass = {'build_sphinx': BuildDoc}, classifiers=[ From 6089a34d8d96123de29cde40b2ff65aafe3d179c Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Fri, 18 Jan 2013 17:32:46 +0000 Subject: [PATCH 7/7] added sympy dependency and scipy version dependency again --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b8b8b24b..432b8b13 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup(name = 'GPy', long_description=read('README.md'), #ext_modules = [Extension(name = 'GPy.kern.lfmUpsilonf2py', # sources = ['GPy/kern/src/lfmUpsilonf2py.f90'])], - install_requires=['pylab', 'numpy>=1.6', 'scipy','matplotlib>=1.1'], + install_requires=['sympy', 'numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1'], setup_requires=['sphinx'], cmdclass = {'build_sphinx': BuildDoc}, classifiers=[