diff --git a/.travis.yml b/.travis.yml index 1de5f18a93..7956a267aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: python -sudo: false +sudo: required cache: directories: @@ -15,12 +15,11 @@ before_install: - . ./scripts/install_miniconda.sh - sh -e /etc/init.d/xvfb start - export DISPLAY=":99.0" + - export MKL_THREADING_LAYER=GNU install: - . ./scripts/create_testenv.sh - - pip install coveralls pylint - - pip install travis-sphinx==2.0.0 - - pip install -r requirements-dev.txt + - pip install coveralls travis-sphinx==2.0.0 env: - PYTHON_VERSION=2.7 FLOATX='float32' TESTCMD="--durations=10 --ignore=pymc3/tests/test_examples.py --cov-append --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py --ignore=pymc3/tests/test_updates.py --ignore=pymc3/tests/test_posteriors.py --ignore=pymc3/tests/test_sampling.py" diff --git a/pymc3/tests/test_sgfs.py b/pymc3/tests/test_sgfs.py index ed4dcc30dc..589eccf508 100644 --- a/pymc3/tests/test_sgfs.py +++ b/pymc3/tests/test_sgfs.py @@ -31,6 +31,6 @@ def f(x, a, b, c): pm.Normal('y', mu=y, observed=y_obs) step_method = pm.SGFS(batch_size=batch_size, step_size=1., total_size=total_size) - trace = pm.sample(draws=draws, step=step_method, init=None) + trace = pm.sample(draws=draws, step=step_method, init=None, njobs=2) np.testing.assert_allclose(np.mean(trace['abc'], axis=0), np.asarray([a, b, c]), rtol=0.1) diff --git a/pymc3/tests/test_text_backend.py b/pymc3/tests/test_text_backend.py index 0eec24574b..457c8e78bf 100644 --- a/pymc3/tests/test_text_backend.py +++ b/pymc3/tests/test_text_backend.py @@ -12,7 +12,7 @@ def test_supports_sampler_stats(self): with pm.Model(): pm.Normal("mu", mu=0, sd=1, shape=2) db = text.Text(self.name) - pm.sample(20, tune=10, init=None, trace=db) + pm.sample(20, tune=10, init=None, trace=db, njobs=2) def teardown_method(self): bf.remove_file_or_directory(self.name) diff --git a/requirements-dev.txt b/requirements-dev.txt index 52c47defd4..d2f9ab1c37 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,12 +6,14 @@ Keras>=2.0.8 matplotlib>=1.5.0 mock>=2.0.0; python_version < '3.4' nbsphinx>=0.2.13 +nose>=1.3.7 nose-parameterized==0.6.0 numdifftools>=0.9.20 numpy>=1.11.0 numpydoc==0.7.0 pycodestyle>=2.3.1 pyflakes>=1.5.0 +pylint>=1.7.4 pytest-cov>=2.5.1 pytest>=3.0.7 recommonmark>=0.4.0 diff --git a/requirements.txt b/requirements.txt index 5b33e02107..9fb0fe42b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -theano==0.9.0 +theano>=1.0.0 pandas>=0.18.0 patsy>=0.4.0 joblib>=0.9 diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 3eac7eb0fb..881a303c0e 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -45,10 +45,10 @@ if [ ${PYTHON_VERSION} == "2.7" ]; then pip install mock fi -pip install pytest pytest-cov nose-parameterized pylint +pip install -r requirements-dev.txt # Install untested, non-required code (linter fails without them) -pip install ipython ipywidgets numdifftools +pip install ipython ipywidgets # matplotlib is not required for the library, but is for tests pip install matplotlib