mirror of
https://github.com/Skyai-io/landsat-util.git
synced 2026-03-10 09:01:18 +00:00
Merge pull request #171 from developmentseed/dependencies
use circleci for tests
This commit is contained in:
42
.travis.yml
42
.travis.yml
@@ -1,42 +0,0 @@
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: QsF7ignSAbH/WCyO6v9bw1exmCWDQR0DqmHkwJ5swc9N44OOOzbWGsaMSYB5y9h+d70fz4arbxQDhsk2KvX4Zd1/2YIMOrIsbgDYeegpkhVPgyQNPKmVqiX+Tb47t1C/TgkC7A07tiPpuefYcLNMZ8gzz7oKhh1UKapYftqzZ+g=
|
||||
- secure: HxjeKWSROBQYy9NuNkgQeaK1ubTF8vH5FcR8nUTSAYxxw/qOzKpqkiq4BcJSRcIwTbkvaBf4MshLGVOxPjMeyJFe06UD/6LvTUGS3bwdya+m0RFjHe5/3wzS8/MxLbTlvgzmuGLLKOsJjXCi9eQQchKfHv+QuhGxhYVLQpnbU9E=
|
||||
- secure: Zq0Z2UA2A7/ieXX8XoMweClJTp8hiVBxoQ1ylJYNd7qsRSk0QvZhn62db5/x48L9S1kELk0sG64q5Pf96/RPLpdjkBUAdEkS7qF+QOvRvAv2woNEHutjlMUvP6jwYGbug+AORg76btZ57OwMOi3aTkagQMMKnokfo7KGbffy0Jo=
|
||||
|
||||
|
||||
install:
|
||||
- pip install --user twine
|
||||
|
||||
before_script:
|
||||
- docker build --file="travis-dockerfile" -t "developmentseed/landsat-util:travis" .
|
||||
|
||||
script:
|
||||
- docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis nosetests
|
||||
|
||||
after_success:
|
||||
- docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}
|
||||
- docker push developmentseed/landsat-util:travis
|
||||
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: devseed
|
||||
password:
|
||||
secure: WtawFW/999XYszmZfj1Qk82l00OSyP2JBVOOGCERrW1gVO7MYtYsgP31HKRSzNTCTHJNVDpdK4WZWY6zPQqC3l2UfWYYsvRn0hCoI8AJxE5VCUEg6Ccpe6fMJuhp1pq6Zy7yrfBSZcOB9aqSHLBJsunD2o3mNlTC8WV8vNK74ck=
|
||||
on:
|
||||
repo: developmentseed/landsat-util
|
||||
branch:
|
||||
- master
|
||||
|
||||
after_deploy:
|
||||
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
echo "Start Docker Hub Push"
|
||||
VER=$(docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis python landsat/landsat.py --version | sed s/[^0-9\.]//g)
|
||||
docker build . -t developmentseed/landsat-util:$VER
|
||||
docker push developmentseed/landsat-util:$VER
|
||||
fi
|
||||
16
Dockerfile
16
Dockerfile
@@ -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
README.rst
14
README.rst
@@ -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
|
||||
@@ -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
|
||||
+++++++++++++++++++++++
|
||||
|
||||
29
circle.yml
Normal file
29
circle.yml
Normal file
@@ -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
|
||||
@@ -63,9 +63,6 @@ Running Tests
|
||||
|
||||
::
|
||||
|
||||
$: pip install -U requirements/dev.txt
|
||||
$: nosetests
|
||||
|
||||
Or::
|
||||
|
||||
$: pip install -r requirements-dev.txt
|
||||
$: python setup.py test
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
-r docker.txt
|
||||
|
||||
numpy>=1.9.3
|
||||
scipy>=0.16.0
|
||||
scikit-image>=0.11.3
|
||||
@@ -1,11 +0,0 @@
|
||||
requests==2.7.0
|
||||
python-dateutil>=2.4.2
|
||||
termcolor>=1.1.0
|
||||
rasterio>=0.27.0
|
||||
six==1.8.0
|
||||
homura>=0.1.2
|
||||
boto>=2.38.0
|
||||
polyline==1.1
|
||||
geocoder>=1.5.1
|
||||
jsonschema==2.5.1
|
||||
usgs==0.1.9
|
||||
28
setup.py
28
setup.py
@@ -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',
|
||||
@@ -34,22 +35,7 @@ setup(
|
||||
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
|
||||
)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
FROM developmentseed/landsat-util:dev
|
||||
ADD . /test
|
||||
RUN apt-get -y update
|
||||
RUN apt-get install --yes git-core
|
||||
RUN cd /test && pip install -r requirements/docker.txt
|
||||
RUN pip install pdoc>=0.3.1 nose>=1.3.7 coverage>=4.0 Sphinx>=1.3.1 wheel>=0.26.0 mock>=1.3.0
|
||||
Reference in New Issue
Block a user