diff --git a/.travis.yml b/.travis.yml index 6cad79c230..5d93859b4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: stage: test install: - . ./scripts/create_testenv.sh - - pip uninstall arviz -y + - conda uninstall arviz -y # replace ArviZ with the lastest master - pip install git+git://github.com/arviz-devs/arviz.git - pip install codecov diff --git a/environment-dev.yml b/environment-dev.yml new file mode 100644 index 0000000000..aacffa1776 --- /dev/null +++ b/environment-dev.yml @@ -0,0 +1,40 @@ +name: testenv +channels: + - conda-forge + - defaults +dependencies: + - python=3.6 + - arviz>=0.9 + - theano>=1.0.4 + - numpy>=1.13 + - scipy>=0.18 + - pandas >=0.18 + - patsy>=0.5 + - fastprogress>=0.2 + - h5py>=2.7 + - typing-extensions>=3.7 + - bokeh>=0.12 + - coverage>=5.1 + - python-graphviz + - ipython>=7.16 + - nbsphinx>=0.4 + - nose>=1.3 + - nose-parameterized>=0.6 + - numpydoc>=0.9 + - pycodestyle>=2.3 + - pyflakes>=1.5 + - pylint>=1.7 + - pytest-cov>=2.5 + - pytest>=3.0 + - recommonmark>=0.4 + - seaborn>=0.8 + - sphinx-autobuild>=0.7 + - sphinx>=1.5 + - watermark + - parameterized + - black + - ipywidgets + - dataclasses # python_version < 3.7 + - contextvars # python_version < 3.7 + - pip: + - black_nbconvert diff --git a/requirements-dev.txt b/requirements-dev.txt index 4c3d2a2859..f11a4da9b7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,9 +1,7 @@ -black_nbconvert bokeh>=0.12.13 -coverage<5.0 +coverage>=5.1 graphviz>=0.8.3 ipython -Keras>=2.0.8 nbsphinx>=0.4.2 nose>=1.3.7 nose-parameterized==0.6.0 @@ -18,4 +16,5 @@ seaborn>=0.8.1 sphinx-autobuild==0.7.1 sphinx>=1.5.5 watermark -dill +parameterized +dill \ No newline at end of file diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 74f1ad31ad..6b31af9ec3 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -20,27 +20,19 @@ command -v conda >/dev/null 2>&1 || { } ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv -PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6 if [ -z ${GLOBAL} ]; then if conda env list | grep -q ${ENVNAME}; then echo "Environment ${ENVNAME} already exists, keeping up to date" else - conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION} + conda config --add channels conda-forge + conda config --set channel_priority strict + conda env create -f environment-dev.yml fi source activate ${ENVNAME} fi -pip install --upgrade pip -conda install --yes mkl-service -conda install --yes -c conda-forge python-graphviz - -# Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423 -pip install --no-cache-dir --force-reinstall -e . -pip install --no-cache-dir --force-reinstall -r requirements-dev.txt - -# Install untested, non-required code (linter fails without them) -pip install ipython ipywidgets +conda update --yes --all # Install editable using the setup.py if [ -z ${NO_SETUP} ]; then diff --git a/scripts/install_miniconda.sh b/scripts/install_miniconda.sh index b4035f4528..6db6f64934 100755 --- a/scripts/install_miniconda.sh +++ b/scripts/install_miniconda.sh @@ -46,5 +46,3 @@ fi export PATH="$INSTALL_FOLDER/bin:$PATH" echo "Adding $INSTALL_FOLDER to PATH. Consider adding it in your .rc file as well." conda update -q -y conda -# Uninstalling miniconda's numpy to avoid conflicting versions when creating the test env -pip uninstall -y numpy