From 4f3e9f2bf7f1bc89341a70df87cd6dfcb94569b7 Mon Sep 17 00:00:00 2001 From: James McMurray Date: Wed, 11 Dec 2013 13:27:54 +0100 Subject: [PATCH 1/2] Testing modification for ReadTheDocs to stop docstring errors --- GPy/util/datasets.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py index 7fd1b6c5..32a22d77 100644 --- a/GPy/util/datasets.py +++ b/GPy/util/datasets.py @@ -30,9 +30,12 @@ overide_manual_authorize=False neil_url = 'http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/' # Read data resources from json file. -path = os.path.join(os.path.dirname(__file__), 'data_resources.json') -json_data=open(path).read() -data_resources = json.loads(json_data) +# Don't do this when ReadTheDocs is scanning as it breaks things +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' #Checks if RTD is scanning +if not (on_rtd): + path = os.path.join(os.path.dirname(__file__), 'data_resources.json') + json_data=open(path).read() + data_resources = json.loads(json_data) def prompt_user(prompt): From b6d8617d044a050c4d7fb4a45cbb8bbbfd3281c0 Mon Sep 17 00:00:00 2001 From: James McMurray Date: Wed, 11 Dec 2013 15:45:27 +0100 Subject: [PATCH 2/2] Adding data_resources.json to setup data files --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3b493022..80f3648a 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup(name = 'GPy', url = "http://sheffieldml.github.com/GPy/", packages = ['GPy', 'GPy.core', 'GPy.kern', 'GPy.util', 'GPy.models_modules', 'GPy.inference', 'GPy.examples', 'GPy.likelihoods', 'GPy.testing', 'GPy.util.latent_space_visualizations', 'GPy.util.latent_space_visualizations.controllers', 'GPy.likelihoods.noise_models', 'GPy.kern.parts', 'GPy.mappings'], package_dir={'GPy': 'GPy'}, - package_data = {'GPy': ['GPy/examples', 'gpy_config.cfg']}, + package_data = {'GPy': ['GPy/examples', 'gpy_config.cfg', 'util/data_resources.json']}, py_modules = ['GPy.__init__'], long_description=read('README.md'), install_requires=['numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1', 'nose'],