Skip to content

Remove pip from scripts and use only conda #3993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 28, 2020
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 40 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 3 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
black_nbconvert
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you removed black_nbconvert? It's needed for NB styling

Copy link
Contributor

@AlexAndorra AlexAndorra Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that Travis cache issue is resolved, couldn't you add back black_nbconvert to the file?

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
Expand All @@ -18,4 +16,5 @@ seaborn>=0.8.1
sphinx-autobuild==0.7.1
sphinx>=1.5.5
watermark
dill
parameterized
dill
16 changes: 4 additions & 12 deletions scripts/create_testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions scripts/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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