Skip to content

Commit

Permalink
Use conda environmnent file for testenv
Browse files Browse the repository at this point in the history
  • Loading branch information
aseyboldt committed Jul 7, 2020
1 parent b6b8e80 commit 94a645a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
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: 1 addition & 6 deletions scripts/create_testenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +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

conda update --yes --all
conda install --yes python-graphviz ipywidgets
conda install --yes --file requirements.txt
conda install --yes --file requirements-dev.txt
pip install --no-cache-dir --force-reinstall black_nbconvert

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

0 comments on commit 94a645a

Please sign in to comment.