Skip to content

Commit

Permalink
Merge pull request #300 from danforthcenter/use-pypi-for-travis-builds
Browse files Browse the repository at this point in the history
Use pypi for travis builds
  • Loading branch information
nfahlgren authored Jan 16, 2019
2 parents 231e515 + 69a7ae9 commit 222aaa7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 64 deletions.
44 changes: 23 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ virtualenv:
#- sh -e /etc/init.d/xvfb start
#- sleep 3
install:
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda info -a
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda env create -q -n test-environment -f ./environments/environment27.yml;
elif [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
conda env create -q -n test-environment -f ./environments/environment36.yml;
elif [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then
conda env create -q -n test-environment -f ./environments/environment37.yml;
fi
- source activate test-environment
#- |
# if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
# wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
# else
# wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
# fi
#- bash miniconda.sh -b -p $HOME/miniconda
#- export PATH="$HOME/miniconda/bin:$PATH"
#- hash -r
#- conda config --set always_yes yes --set changeps1 no
#- conda info -a
#- |
# if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
# conda env create -q -n test-environment -f ./environments/environment27.yml;
# elif [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
# conda env create -q -n test-environment -f ./environments/environment36.yml;
# elif [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then
# conda env create -q -n test-environment -f ./environments/environment37.yml;
# fi
#- source activate test-environment
- pip install -r requirements.txt
- pip install coveralls pytest
- python setup.py install
script:
- source activate test-environment
#- source activate test-environment
- coverage run --source=plantcv setup.py test
after_success: coveralls
branches:
Expand Down
13 changes: 8 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Then create an environment and install PlantCV.
conda create -n plantcv plantcv
```

Or install PlantCV in your current environment.

```bash
conda install plantcv
```

### Manual installs

You can build PlantCV from the source on GitHub if you are a developer or want the absolute latest version possible.
Expand All @@ -92,7 +98,7 @@ a zip file of the package from [GitHub](https://github.com/danforthcenter/plantc

Once you have `conda` and `git` or GitHub Desktop installed, clone the PlantCV repository, open a command-line terminal
application (on Windows there are other options but for this tutorial we will use the Anaconda Prompt application). In
the examples below we use Python 3.7, feel free to use our Python 2.7 or 3.6 environment instead, or create your own.
the example below we use an environment configuration file that is included with PlantCV.

```bash
# Clone PlantCV if you did not use the GitHub Desktop application
Expand All @@ -102,14 +108,11 @@ git clone https://github.com/danforthcenter/plantcv.git
cd plantcv

# Create a conda environment named "plantcv" and automatically install the dependencies
conda env create -n plantcv -f ./environments/environment37.yml
conda env create -n plantcv -f environment.yml

# Activate the plantcv environment (you will have to do this each time you start a new session)
source activate plantcv

# Install OpenCV (not through conda)
pip install opencv-python

# Test PlantCV (optional)
python setup.py test

Expand Down
File renamed without changes.
18 changes: 0 additions & 18 deletions environments/environment27.yml

This file was deleted.

18 changes: 0 additions & 18 deletions environments/environment36.yml

This file was deleted.

3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
matplotlib>=1.5
numpy>=1.11
numpy>=1.11,<1.16
pandas
python-dateutil
scipy
scikit-image
pytest
plotnine
opencv-python<4

0 comments on commit 222aaa7

Please sign in to comment.