Skip to content

Commit

Permalink
Merge pull request #171 from developmentseed/dependencies
Browse files Browse the repository at this point in the history
use circleci for tests
  • Loading branch information
Scisco committed Mar 25, 2016
2 parents 18120db + 4335c9f commit ac7a095
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 109 deletions.
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get install --yes git-core python-pip python-skimage python-numpy python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev python-pycurl
ADD landsat /usr/local/lib/python2.7/dist-packages/landsat
ADD bin/landsat /usr/local/bin/
RUN apt-get install --yes git-core python-pip python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev python-pycurl
ADD . /landsat
RUN cd /landsat && pip install -r requirements/docker.txt
RUN pip install setuptools
RUN pip install -U pip
RUN pip install wheel
RUN pip install https://s3-us-west-2.amazonaws.com/ds-satellite-projects/landsat-util/numpy-1.10.4-cp27-cp27mu-linux_x86_64.whl
RUN pip install https://s3-us-west-2.amazonaws.com/ds-satellite-projects/landsat-util/Pillow-3.1.1-cp27-cp27mu-linux_x86_64.whl
RUN pip install https://s3-us-west-2.amazonaws.com/ds-satellite-projects/landsat-util/scikit_image-0.12.3-cp27-cp27mu-manylinux1_x86_64.whl
RUN cd /landsat && pip install -r requirements-dev.txt
RUN sed -i 's/numpy.*//g' /landsat/requirements.txt
RUN sed -i 's/scipy.*//g' /landsat/requirements.txt
RUN sed -i 's/scikit-image.*//g' /landsat/requirements.txt
RUN cd /landsat && pip install -e .
14 changes: 2 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Landsat-util
===============

.. image:: https://travis-ci.org/developmentseed/landsat-util.svg?branch=v0.5
:target: https://travis-ci.org/developmentseed/landsat-util
.. image:: https://circleci.com/gh/developmentseed/landsat-util.svg?style=svg
:target: https://circleci.com/gh/developmentseed/landsat-util

.. image:: https://badge.fury.io/py/landsat-util.svg
:target: http://badge.fury.io/py/landsat-util
Expand All @@ -29,16 +29,6 @@ To run the documentation locally::
$ cd docs
$ make html

Travis Tests
++++++++++++

To speed up testing on travis, we use a docker image.

To test with docker image locally run:

.. code::
$ docker run --rm -it -v "$(pwd)":/test developmentseed/landsat-util:travis nosetests

Recently Added Features
+++++++++++++++++++++++
Expand Down
29 changes: 29 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
machine:
python:
version: 2.7.10

dependencies:
pre:
- sudo apt-get -y update
- sudo apt-get install -f --yes libgdal-dev
- pip install setuptools
- pip install -U pip
- pip install wheel
- pip install cython>=0.21
- pip install numpy==1.10.4
- pip install -r requirements-dev.txt
- pip install -e .

test:
override:
- python setup.py test


deployment:
production:
branch: master
commands:
- echo "[pypi]" > ~/.pypirc
- echo "username:" $PYPI_USERNAME >> ~/.pypirc
- echo "password:" $PYPI_PASSWORD >> ~/.pypirc
- make release
7 changes: 2 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ Running Tests

::

$: pip install -U requirements/dev.txt
$: nosetests

Or::

$: pip install -r requirements-dev.txt
$: python setup.py test

2 changes: 1 addition & 1 deletion requirements/dev.txt → requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r base.txt
pdoc>=0.3.1
nose>=1.3.7
coverage>=4.0
Sphinx>=1.3.1
wheel>=0.26.0
mock>=1.3.0
jsonschema==2.5.1
16 changes: 14 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
-r requirements/base.txt

usgs==0.1.9
requests==2.7.0
python-dateutil==2.5.1
numpy==1.10.4
termcolor==1.1.0
rasterio==0.32.0
six==1.8.0
scipy==0.17.0
scikit-image==0.12.3
homura==0.1.3
boto==2.39.0
polyline==1.1
geocoder==1.9.0
matplotlib==1.5.1
5 changes: 0 additions & 5 deletions requirements/base.txt

This file was deleted.

11 changes: 0 additions & 11 deletions requirements/docker.txt

This file was deleted.

28 changes: 7 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ def readme():
with open('README.rst') as f:
return f.read()

test_requirements = [
'nose>=1.3.7',
'mock>=1.3.0'
]
with open('requirements.txt') as fid:
INSTALL_REQUIRES = [l.strip() for l in fid.readlines() if l]

with open('requirements-dev.txt') as fid:
TEST_REQUIRES = [l.strip() for l in fid.readlines() if l]

setup(
name='landsat-util',
Expand All @@ -34,22 +35,7 @@ def readme():
include_package_data=True,
license='CCO',
platforms='Posix; MacOS X; Windows',
install_requires=[
'usgs==0.1.9',
'requests==2.7.0',
'python-dateutil>=2.4.2',
'numpy>=1.9.3',
'termcolor>=1.1.0',
'rasterio>=0.26.0',
'six==1.8.0',
'scipy>=0.16.0',
'scikit-image>=0.11.3',
'homura>=0.1.2',
'boto>=2.38.0',
'polyline==1.1',
'geocoder>=1.5.1',
'matplotlib==1.5.1'
],
install_requires=INSTALL_REQUIRES,
test_suite='nose.collector',
tests_require=test_requirements
tests_require=TEST_REQUIRES
)
6 changes: 0 additions & 6 deletions travis-dockerfile

This file was deleted.

0 comments on commit ac7a095

Please sign in to comment.