Skip to content

Commit 8d039ea

Browse files
aseyboldttwiecki
andauthored
Remove pip from scripts and use only conda (#3993)
* Remove pip from scripts and use only conda * Remove dev dependency on black_nbconvert * Use requirements.txt in tests * Add parameterized to dev requirements * Add some py37 leftovers * Update conda packages during travis tests * Remove Keras dependency * Use conda to uninstall arviz for travis test * Install black_nbconvert in testenv * Use conda environmnent file for testenv Co-authored-by: Thomas Wiecki <[email protected]>
1 parent c7afc21 commit 8d039ea

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
stage: test
4949
install:
5050
- . ./scripts/create_testenv.sh
51-
- pip uninstall arviz -y
51+
- conda uninstall arviz -y
5252
# replace ArviZ with the lastest master
5353
- pip install git+git://github.com/arviz-devs/arviz.git
5454
- pip install codecov

environment-dev.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: testenv
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.6
7+
- arviz>=0.9
8+
- theano>=1.0.4
9+
- numpy>=1.13
10+
- scipy>=0.18
11+
- pandas >=0.18
12+
- patsy>=0.5
13+
- fastprogress>=0.2
14+
- h5py>=2.7
15+
- typing-extensions>=3.7
16+
- bokeh>=0.12
17+
- coverage>=5.1
18+
- python-graphviz
19+
- ipython>=7.16
20+
- nbsphinx>=0.4
21+
- nose>=1.3
22+
- nose-parameterized>=0.6
23+
- numpydoc>=0.9
24+
- pycodestyle>=2.3
25+
- pyflakes>=1.5
26+
- pylint>=1.7
27+
- pytest-cov>=2.5
28+
- pytest>=3.0
29+
- recommonmark>=0.4
30+
- seaborn>=0.8
31+
- sphinx-autobuild>=0.7
32+
- sphinx>=1.5
33+
- watermark
34+
- parameterized
35+
- black
36+
- ipywidgets
37+
- dataclasses # python_version < 3.7
38+
- contextvars # python_version < 3.7
39+
- pip:
40+
- black_nbconvert

requirements-dev.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
black_nbconvert
21
bokeh>=0.12.13
3-
coverage<5.0
2+
coverage>=5.1
43
graphviz>=0.8.3
54
ipython
6-
Keras>=2.0.8
75
nbsphinx>=0.4.2
86
nose>=1.3.7
97
nose-parameterized==0.6.0
@@ -18,4 +16,5 @@ seaborn>=0.8.1
1816
sphinx-autobuild==0.7.1
1917
sphinx>=1.5.5
2018
watermark
21-
dill
19+
parameterized
20+
dill

scripts/create_testenv.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,19 @@ command -v conda >/dev/null 2>&1 || {
2020
}
2121

2222
ENVNAME="${ENVNAME:-testenv}" # if no ENVNAME is specified, use testenv
23-
PYTHON_VERSION=${PYTHON_VERSION:-3.6} # if no python specified, use 3.6
2423

2524
if [ -z ${GLOBAL} ]; then
2625
if conda env list | grep -q ${ENVNAME}; then
2726
echo "Environment ${ENVNAME} already exists, keeping up to date"
2827
else
29-
conda create -n ${ENVNAME} --yes pip python=${PYTHON_VERSION}
28+
conda config --add channels conda-forge
29+
conda config --set channel_priority strict
30+
conda env create -f environment-dev.yml
3031
fi
3132
source activate ${ENVNAME}
3233
fi
33-
pip install --upgrade pip
3434

35-
conda install --yes mkl-service
36-
conda install --yes -c conda-forge python-graphviz
37-
38-
# Travis env is unable to import cached mpl sometimes https://github.com/pymc-devs/pymc3/issues/3423
39-
pip install --no-cache-dir --force-reinstall -e .
40-
pip install --no-cache-dir --force-reinstall -r requirements-dev.txt
41-
42-
# Install untested, non-required code (linter fails without them)
43-
pip install ipython ipywidgets
35+
conda update --yes --all
4436

4537
# Install editable using the setup.py
4638
if [ -z ${NO_SETUP} ]; then

scripts/install_miniconda.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,3 @@ fi
4646
export PATH="$INSTALL_FOLDER/bin:$PATH"
4747
echo "Adding $INSTALL_FOLDER to PATH. Consider adding it in your .rc file as well."
4848
conda update -q -y conda
49-
# Uninstalling miniconda's numpy to avoid conflicting versions when creating the test env
50-
pip uninstall -y numpy

0 commit comments

Comments
 (0)