From 7f5998b40b6a48f01bd8a34140987d93ac61244f Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 11:49:08 -0400 Subject: [PATCH 01/32] update requirements order --- requirements-dev.txt | 20 ++++++++++++++++++++ requirements.txt | 16 ++++++++++++++-- requirements/base.txt | 5 ----- requirements/dev.txt | 7 ------- requirements/docker.txt | 11 ----------- setup.py | 27 +++++++-------------------- 6 files changed, 41 insertions(+), 45 deletions(-) create mode 100644 requirements-dev.txt delete mode 100644 requirements/base.txt delete mode 100644 requirements/dev.txt delete mode 100644 requirements/docker.txt diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..567a991 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,20 @@ +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 +pdoc>=0.3.1 +nose>=1.3.7 +coverage>=4.0 +Sphinx>=1.3.1 +wheel>=0.26.0 +mock>=1.3.0 diff --git a/requirements.txt b/requirements.txt index 10385ce..9aadb0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index b51f35f..0000000 --- a/requirements/base.txt +++ /dev/null @@ -1,5 +0,0 @@ --r docker.txt - -numpy>=1.9.3 -scipy>=0.16.0 -scikit-image>=0.11.3 diff --git a/requirements/dev.txt b/requirements/dev.txt deleted file mode 100644 index 034bd45..0000000 --- a/requirements/dev.txt +++ /dev/null @@ -1,7 +0,0 @@ --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 diff --git a/requirements/docker.txt b/requirements/docker.txt deleted file mode 100644 index 6939c1e..0000000 --- a/requirements/docker.txt +++ /dev/null @@ -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 diff --git a/setup.py b/setup.py index 2d28f84..e6d1219 100644 --- a/setup.py +++ b/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,21 +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' - ], + install_requires=INSTALL_REQUIRES, test_suite='nose.collector', - tests_require=test_requirements + tests_require=TEST_REQUIRES ) From 1730439d943eee670f530a8289aae2cd3425f4a3 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 11:49:16 -0400 Subject: [PATCH 02/32] skip all tests for now --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f338ceb..625c47e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,15 +13,8 @@ env: 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 +- echo 'nothing' deploy: provider: pypi From 2dd5c10eb95af4863b0e49cde4ec9d732d4083d5 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 12:04:01 -0400 Subject: [PATCH 03/32] add jsonschema --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 567a991..16e1034 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,3 +18,4 @@ coverage>=4.0 Sphinx>=1.3.1 wheel>=0.26.0 mock>=1.3.0 +jsonschema==2.5.1 From fa98f6020e70d0602382714303568b19cba3a8c1 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 12:04:07 -0400 Subject: [PATCH 04/32] updated travis --- .travis.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 625c47e..455bfe9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ -sudo: required +language: python +sudo: false + +cache: + directories: + - ~/.cache/pip services: - docker @@ -8,13 +13,22 @@ env: - secure: QsF7ignSAbH/WCyO6v9bw1exmCWDQR0DqmHkwJ5swc9N44OOOzbWGsaMSYB5y9h+d70fz4arbxQDhsk2KvX4Zd1/2YIMOrIsbgDYeegpkhVPgyQNPKmVqiX+Tb47t1C/TgkC7A07tiPpuefYcLNMZ8gzz7oKhh1UKapYftqzZ+g= - secure: HxjeKWSROBQYy9NuNkgQeaK1ubTF8vH5FcR8nUTSAYxxw/qOzKpqkiq4BcJSRcIwTbkvaBf4MshLGVOxPjMeyJFe06UD/6LvTUGS3bwdya+m0RFjHe5/3wzS8/MxLbTlvgzmuGLLKOsJjXCi9eQQchKfHv+QuhGxhYVLQpnbU9E= - secure: Zq0Z2UA2A7/ieXX8XoMweClJTp8hiVBxoQ1ylJYNd7qsRSk0QvZhn62db5/x48L9S1kELk0sG64q5Pf96/RPLpdjkBUAdEkS7qF+QOvRvAv2woNEHutjlMUvP6jwYGbug+AORg76btZ57OwMOi3aTkagQMMKnokfo7KGbffy0Jo= + - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels + - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels + +before_install: + - pip install -U pip + - pip install wheel install: -- pip install --user twine + - pip wheel -r requirements-dev.txt + - pip install -r requirements-dev.txt + - pip install -e . + script: -- echo 'nothing' +- nosetests deploy: provider: pypi From 043ef5086b426066b85fb35dddc57a6cc034b109 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 12:17:20 -0400 Subject: [PATCH 05/32] add deps --- .travis.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 455bfe9..6721da7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,15 @@ cache: directories: - ~/.cache/pip -services: -- docker +addons: + apt: + packages: + - libgdal1h + - gdal-bin + - libgdal-dev + - libatlas-dev + - libatlas-base-dev + - gfortran env: global: @@ -22,7 +29,6 @@ before_install: install: - - pip wheel -r requirements-dev.txt - pip install -r requirements-dev.txt - pip install -e . From 9a7c0e3836f4cb0da22a426da0d9ec3812ef893e Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 13:27:15 -0400 Subject: [PATCH 06/32] remove dockerfile for travis --- travis-dockerfile | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 travis-dockerfile diff --git a/travis-dockerfile b/travis-dockerfile deleted file mode 100644 index 94ffaee..0000000 --- a/travis-dockerfile +++ /dev/null @@ -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 From b8f2c39e89e9be3b93b5c1458526d70b92de40c5 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 13:27:30 -0400 Subject: [PATCH 07/32] limit dev requirements to tests related modules --- requirements-dev.txt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 16e1034..7f71cc4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,17 +1,3 @@ -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 pdoc>=0.3.1 nose>=1.3.7 coverage>=4.0 From f44b72b18f4bd2c941ee6c32cc2767ca4b85ba75 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 13:27:41 -0400 Subject: [PATCH 08/32] new dockerfile --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fcbb705..c188b4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,13 @@ 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/ 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 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 sed -i 's/matplotlib.*//g' /landsat/requirements.txt +RUN cd /landsat && pip install -e . From cd21dd7646aa06b994db6b108ea3b0b71cc7dca9 Mon Sep 17 00:00:00 2001 From: Scisco Date: Thu, 24 Mar 2016 13:28:06 -0400 Subject: [PATCH 09/32] use apt-get install --- .travis.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6721da7..2fc8e9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,9 @@ language: python -sudo: false cache: directories: - ~/.cache/pip -addons: - apt: - packages: - - libgdal1h - - gdal-bin - - libgdal-dev - - libatlas-dev - - libatlas-base-dev - - gfortran - env: global: - secure: QsF7ignSAbH/WCyO6v9bw1exmCWDQR0DqmHkwJ5swc9N44OOOzbWGsaMSYB5y9h+d70fz4arbxQDhsk2KvX4Zd1/2YIMOrIsbgDYeegpkhVPgyQNPKmVqiX+Tb47t1C/TgkC7A07tiPpuefYcLNMZ8gzz7oKhh1UKapYftqzZ+g= @@ -24,17 +13,22 @@ env: - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels before_install: + - sudo apt-get update -q + - sudo apt-get install --yes python-skimage python-numpy python-scipy libgdal1h gdal-bin libgdal-dev libatlas-dev libatlas-base-dev gfortran - pip install -U pip - pip install wheel + - sed -i 's/numpy.*//g' /landsat/requirements.txt + - sed -i 's/scipy.*//g' /landsat/requirements.txt + - sed -i 's/scikit-image.*//g' /landsat/requirements.txt + - sed -i 's/matplotlib.*//g' /landsat/requirements.txt install: - - pip install -r requirements-dev.txt - pip install -e . script: -- nosetests +- python setup.py test deploy: provider: pypi From 097ba27e5eebfe7bc613bf01a4377107a61f125d Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:27:05 -0400 Subject: [PATCH 10/32] updated docker --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c188b4e..b42bd00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +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 +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 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 sed -i 's/matplotlib.*//g' /landsat/requirements.txt RUN cd /landsat && pip install -e . From 0628d323ba582fdc3d2915043f4b780d6aaf7044 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:27:21 -0400 Subject: [PATCH 11/32] circle test --- circle.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..a93a968 --- /dev/null +++ b/circle.yml @@ -0,0 +1,18 @@ +machine: + python: + version: + - 2.7.10 + - 3.4.0 + - 3.5.0 + +dependencies: + pre: + - sudo apt-get -y update + - sudo 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 + - pip install -r requirements-dev.txt + - pip install -e . + +test: + override: + - python setup.py test + From 3f469bb461fcad4a641be49bd3468fbbd50e7558 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:31:48 -0400 Subject: [PATCH 12/32] version must be string --- circle.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index a93a968..b0491dc 100644 --- a/circle.yml +++ b/circle.yml @@ -1,9 +1,6 @@ machine: python: - version: - - 2.7.10 - - 3.4.0 - - 3.5.0 + version: 2.7.10 dependencies: pre: From e71ad3a2cef5903f445d94a874a818ee8e5aae8b Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:45:05 -0400 Subject: [PATCH 13/32] force install --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index b0491dc..0d0b87e 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,7 @@ machine: dependencies: pre: - sudo apt-get -y update - - sudo 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 + - sudo apt-get install -f --yes git-core python-pip python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev python-pycurl - pip install -r requirements-dev.txt - pip install -e . From de28be508743dffe269b3dbb4c2994b9b0a9a5ee Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:49:14 -0400 Subject: [PATCH 14/32] relax dependencies --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 0d0b87e..60a16a6 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,7 @@ machine: dependencies: pre: - sudo apt-get -y update - - sudo apt-get install -f --yes git-core python-pip python-scipy libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev python-pycurl + - sudo apt-get install -f --yes libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev - pip install -r requirements-dev.txt - pip install -e . From 502c98bc49fc6d41d5460bec1b3a4794aaef5beb Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:52:33 -0400 Subject: [PATCH 15/32] remoove freetype --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 60a16a6..9e15990 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,7 @@ machine: dependencies: pre: - sudo apt-get -y update - - sudo apt-get install -f --yes libgdal-dev libatlas-base-dev gfortran libfreetype6-dev libglib2.0-dev zlib1g-dev + - sudo apt-get install -f --yes libgdal-dev libatlas-base-dev gfortran libglib2.0-dev zlib1g-dev - pip install -r requirements-dev.txt - pip install -e . From a9189ef87553eae3ff1cbc8ee4b46bd34a7493ed Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:55:07 -0400 Subject: [PATCH 16/32] remove all apt-gets --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 9e15990..9b16266 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,7 @@ machine: dependencies: pre: - sudo apt-get -y update - - sudo apt-get install -f --yes libgdal-dev libatlas-base-dev gfortran libglib2.0-dev zlib1g-dev + - sudo apt-get install -f --yes libgdal-dev - pip install -r requirements-dev.txt - pip install -e . From 75d468280b1d30a8d76cc51541405257d414722e Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:56:42 -0400 Subject: [PATCH 17/32] install setuptools and wheel --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circle.yml b/circle.yml index 9b16266..c142bbe 100644 --- a/circle.yml +++ b/circle.yml @@ -6,6 +6,9 @@ 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 -r requirements-dev.txt - pip install -e . From e62623697b607e54beeb42f4d5bf05409ae7a5d3 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 11:58:24 -0400 Subject: [PATCH 18/32] install numpy --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index c142bbe..fe3d59d 100644 --- a/circle.yml +++ b/circle.yml @@ -9,6 +9,7 @@ dependencies: - pip install setuptools - pip install -U pip - pip install wheel + - pip install numpy==1.10.4 - pip install -r requirements-dev.txt - pip install -e . From 3e58bfc2d18b5a90a7039ba32adc8e7bc0a926c9 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 12:36:14 -0400 Subject: [PATCH 19/32] install cython --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index fe3d59d..292a4d2 100644 --- a/circle.yml +++ b/circle.yml @@ -9,6 +9,7 @@ dependencies: - 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 . From a7cb482ed186ada1a6a13b3deab289fea3c898aa Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 13:09:47 -0400 Subject: [PATCH 20/32] remove travis --- .travis.yml | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2fc8e9b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: python - -cache: - directories: - - ~/.cache/pip - -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= - - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels - - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels - -before_install: - - sudo apt-get update -q - - sudo apt-get install --yes python-skimage python-numpy python-scipy libgdal1h gdal-bin libgdal-dev libatlas-dev libatlas-base-dev gfortran - - pip install -U pip - - pip install wheel - - sed -i 's/numpy.*//g' /landsat/requirements.txt - - sed -i 's/scipy.*//g' /landsat/requirements.txt - - sed -i 's/scikit-image.*//g' /landsat/requirements.txt - - sed -i 's/matplotlib.*//g' /landsat/requirements.txt - - -install: - - pip install -e . - - -script: -- python setup.py test - -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 From d6d85945de6099954a70b8e5c8005aa2a3ef8c55 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 14:08:23 -0400 Subject: [PATCH 21/32] add pypi deployment --- circle.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/circle.yml b/circle.yml index 292a4d2..71dc25e 100644 --- a/circle.yml +++ b/circle.yml @@ -18,3 +18,12 @@ 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 From b0a51d50a8d5c8abe5eb4f66d4965d0ddd3d9c6d Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 14:14:12 -0400 Subject: [PATCH 22/32] add circle ci badge and update tests --- README.rst | 14 ++------------ docs/installation.rst | 7 ++----- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index 150181c..702434d 100644 --- a/README.rst +++ b/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 +++++++++++++++++++++++ diff --git a/docs/installation.rst b/docs/installation.rst index 62e00f0..30ba094 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -63,9 +63,6 @@ Running Tests :: - $: pip install -U requirements/dev.txt - $: nosetests - -Or:: - + $: pip install -r requirements-dev.txt $: python setup.py test + From 2ad1aa77713a7b69de75edc3fba2d15aad937bdf Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 14:21:28 -0400 Subject: [PATCH 23/32] change bandge to show status of develop branch --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 702434d..dd859cf 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ Landsat-util =============== -.. image:: https://circleci.com/gh/developmentseed/landsat-util.svg?style=svg - :target: https://circleci.com/gh/developmentseed/landsat-util +.. image:: https://circleci.com/gh/developmentseed/landsat-util/tree/develop.svg?style=svg + :target: https://circleci.com/gh/developmentseed/landsat-util/tree/develop .. image:: https://badge.fury.io/py/landsat-util.svg :target: http://badge.fury.io/py/landsat-util From b9f8e52d3c84d03d93ce8451e75ae6cd389e0225 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Fri, 25 Mar 2016 12:58:34 -0600 Subject: [PATCH 24/32] Python 3 is now supported After I adjusted imports to be absolute, the rest of the work was sorting out the distinction between bytes and strs. The uploader was written for strings of bytes and needed to be changed to actual bytes. Closes #170 --- landsat/decorators.py | 1 + landsat/downloader.py | 9 ++++++--- landsat/image.py | 8 +++++--- landsat/landsat.py | 34 ++++++++++++++++++++-------------- landsat/mixins.py | 4 +++- landsat/ndvi.py | 10 ++++++---- landsat/search.py | 6 ++++-- landsat/uploader.py | 35 ++++++++++++++++++++++------------- landsat/utils.py | 14 +++++++++++--- tests/test_image.py | 16 +++++++++++----- tests/test_landsat.py | 4 ++-- tests/test_mixins.py | 29 ++++++++++++++++++----------- tests/test_search.py | 1 + tests/test_uploader.py | 26 +++++++++++++------------- tox.ini | 13 +++++++++++++ 15 files changed, 136 insertions(+), 74 deletions(-) create mode 100644 tox.ini diff --git a/landsat/decorators.py b/landsat/decorators.py index 4f439f2..1f79391 100644 --- a/landsat/decorators.py +++ b/landsat/decorators.py @@ -1,4 +1,5 @@ import warnings + import rasterio diff --git a/landsat/downloader.py b/landsat/downloader.py index f82e0ee..7cb4cef 100644 --- a/landsat/downloader.py +++ b/landsat/downloader.py @@ -1,5 +1,8 @@ # Landsat Util # License: CC0 1.0 Universal + +from __future__ import print_function, division, absolute_import + from xml.etree import ElementTree from os.path import join, exists, getsize @@ -7,9 +10,9 @@ import requests from usgs import api, USGSError from homura import download as fetch -from utils import check_create_folder, url_builder -from mixins import VerbosityMixin -import settings +from .utils import check_create_folder, url_builder +from .mixins import VerbosityMixin +from . import settings class RemoteFileDoesntExist(Exception): diff --git a/landsat/image.py b/landsat/image.py index af123be..9e930e0 100644 --- a/landsat/image.py +++ b/landsat/image.py @@ -2,6 +2,8 @@ # Landsat Util # License: CC0 1.0 Universal +from __future__ import print_function, division, absolute_import + import os import tarfile import glob @@ -20,9 +22,9 @@ from skimage.util import img_as_ubyte from skimage.exposure import rescale_intensity from polyline.codec import PolylineCodec -from mixins import VerbosityMixin -from utils import get_file, check_create_folder, exit, adjust_bounding_box -from decorators import rasterio_decorator +from .mixins import VerbosityMixin +from .utils import get_file, check_create_folder, exit, adjust_bounding_box +from .decorators import rasterio_decorator class FileDoesNotExist(Exception): diff --git a/landsat/landsat.py b/landsat/landsat.py index 0594234..373f406 100755 --- a/landsat/landsat.py +++ b/landsat/landsat.py @@ -3,11 +3,17 @@ # Landsat Util # License: CC0 1.0 Universal +from __future__ import print_function, division, absolute_import + import argparse import textwrap import json from os.path import join -from urllib2 import URLError + +try: + from urllib.request import URLError +except ImportError: + from urllib2 import URLError from datetime import datetime from dateutil.relativedelta import relativedelta @@ -15,15 +21,15 @@ from dateutil.parser import parse import pycurl from boto.exception import NoAuthHandlerFound -from downloader import Downloader, IncorrectSceneId, RemoteFileDoesntExist, USGSInventoryAccessMissing -from search import Search -from uploader import Uploader -from utils import reformat_date, convert_to_integer_list, timer, exit, get_file, convert_to_float_list -from mixins import VerbosityMixin -from image import Simple, PanSharpen, FileDoesNotExist -from ndvi import NDVIWithManualColorMap, NDVI -from __init__ import __version__ -import settings +from .downloader import Downloader, IncorrectSceneId, RemoteFileDoesntExist, USGSInventoryAccessMissing +from .search import Search +from .uploader import Uploader +from .utils import reformat_date, convert_to_integer_list, timer, exit, get_file, convert_to_float_list +from .mixins import VerbosityMixin +from .image import Simple, PanSharpen, FileDoesNotExist +from .ndvi import NDVIWithManualColorMap, NDVI +from .__init__ import __version__ +from . import settings DESCRIPTION = """Landsat-util is a command line utility that makes it easy to @@ -465,10 +471,10 @@ def process_image(path, bands=None, verbose=False, pansharpen=False, ndvi=False, p = Simple(path, bands=bands, dst_path=settings.PROCESSED_IMAGE, verbose=verbose, force_unzip=force_unzip, bounds=bounds) - except IOError as e: - exit(e.message, 1) - except FileDoesNotExist as e: - exit(e.message, 1) + except IOError as err: + exit(str(err), 1) + except FileDoesNotExist as err: + exit(str(err), 1) return p.run() diff --git a/landsat/mixins.py b/landsat/mixins.py index 0adbf66..f7a5928 100644 --- a/landsat/mixins.py +++ b/landsat/mixins.py @@ -2,6 +2,8 @@ # Landsat Util # License: CC0 1.0 Universal +from __future__ import print_function, division, absolute_import + import sys import subprocess from termcolor import colored @@ -108,6 +110,6 @@ class VerbosityMixin(object): if indent: msg = (' ' * indent) + msg - sys.stdout.write(msg + '\n') + print(msg) return msg diff --git a/landsat/ndvi.py b/landsat/ndvi.py index 931192c..d71d438 100644 --- a/landsat/ndvi.py +++ b/landsat/ndvi.py @@ -1,11 +1,13 @@ +from __future__ import print_function, division, absolute_import + from os.path import join import rasterio import numpy -import settings -from decorators import rasterio_decorator -from image import BaseProcess +from . import settings +from .decorators import rasterio_decorator +from .image import BaseProcess class NDVI(BaseProcess): @@ -45,7 +47,7 @@ class NDVI(BaseProcess): except IOError: pass - self.cmap = {k: v[:4] for k, v in colormap.iteritems()} + self.cmap = {k: v[:4] for k, v in colormap.items()} @rasterio_decorator def run(self): diff --git a/landsat/search.py b/landsat/search.py index 6902e23..f3a5849 100644 --- a/landsat/search.py +++ b/landsat/search.py @@ -1,12 +1,14 @@ # Landsat Util # License: CC0 1.0 Universal +from __future__ import print_function, division, absolute_import + import json import time import requests -import settings -from utils import three_digit, create_paired_list, geocode +from . import settings +from .utils import three_digit, create_paired_list, geocode class Search(object): diff --git a/landsat/uploader.py b/landsat/uploader.py index c1e9e4f..dc57c90 100644 --- a/landsat/uploader.py +++ b/landsat/uploader.py @@ -4,23 +4,32 @@ # The S3 uploader is a fork of pys3upload (https://github.com/leetreveil/pys3upload) -from __future__ import print_function, division +from __future__ import print_function, division, absolute_import import os import sys import time import threading import contextlib -import Queue -from multiprocessing import pool + try: - import cStringIO - StringIO = cStringIO + import queue +except: + import Queue as queue + +from multiprocessing import pool + +try: + from io import BytesIO as StringIO except ImportError: - import StringIO + try: + from cStringIO import StringIO + except: + from StringIO import StringIO from boto.s3.connection import S3Connection -from mixins import VerbosityMixin + +from .mixins import VerbosityMixin STREAM = sys.stderr @@ -96,7 +105,7 @@ class Uploader(VerbosityMixin): self.output('Uploading to S3', normal=True, arrow=True) upload(bucket_name, self.key, self.secret, - data_collector(f.readlines()), filename, cb, + data_collector(iter(f)), filename, cb, threads=10, replace=True, secure=True, connection=self.conn) print('\n') @@ -114,7 +123,7 @@ def data_collector(iterable, def_buf_size=5242880): :returns: A generator object """ - buf = '' + buf = b'' for data in iterable: buf += data if len(buf) >= def_buf_size: @@ -130,11 +139,11 @@ def upload_part(upload_func, progress_cb, part_no, part_data): def _upload_part(retries_left=num_retries): try: - with contextlib.closing(StringIO.StringIO(part_data)) as f: + with contextlib.closing(StringIO(part_data)) as f: f.seek(0) cb = lambda c, t: progress_cb(part_no, c, t) if progress_cb else None upload_func(f, part_no, cb=cb, num_cb=100) - except Exception, exc: + except Exception as exc: retries_left -= 1 if retries_left > 0: return _upload_part(retries_left=retries_left) @@ -208,7 +217,7 @@ def upload(bucket, aws_access_key, aws_secret_key, raise Exception('s3 key ' + key + ' already exists') multipart_obj = b.initiate_multipart_upload(key) - err_queue = Queue.Queue() + err_queue = queue.Queue() lock = threading.Lock() upload.counter = 0 @@ -218,7 +227,7 @@ def upload(bucket, aws_access_key, aws_secret_key, def check_errors(): try: exc = err_queue.get(block=False) - except Queue.Empty: + except queue.Empty: pass else: raise exc diff --git a/landsat/utils.py b/landsat/utils.py index c6a3545..82a226f 100644 --- a/landsat/utils.py +++ b/landsat/utils.py @@ -1,15 +1,23 @@ # Landsat Util # License: CC0 1.0 Universal +from __future__ import print_function, division, absolute_import + import os import sys import time import re -from cStringIO import StringIO + +try: + from io import StringIO +except ImportError: + from cStringIO import StringIO + from datetime import datetime + import geocoder -from mixins import VerbosityMixin +from .mixins import VerbosityMixin class Capturing(list): @@ -43,7 +51,7 @@ class timer(object): def __exit__(self, type, value, traceback): self.end = time.time() - print 'Time spent : {0:.2f} seconds'.format((self.end - self.start)) + print('Time spent : {0:.2f} seconds'.format((self.end - self.start))) def exit(message, code=0): diff --git a/tests/test_image.py b/tests/test_image.py index e81f0c8..d2bbaba 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -8,6 +8,7 @@ import errno import shutil import unittest from tempfile import mkdtemp + import rasterio from rasterio.warp import transform_bounds @@ -62,7 +63,8 @@ class TestProcess(unittest.TestCase): bounds=bounds) path = p.run() self.assertTrue(exists(path)) - self.assertEqual(map('{0:.2f}'.format, get_bounds(path)), map('{0:.2f}'.format, bounds)) + for val, exp in zip(get_bounds(path), bounds): + self.assertAlmostEqual(val, exp, 2) def test_simple_with_intersecting_bounds_clip(self): @@ -72,7 +74,8 @@ class TestProcess(unittest.TestCase): bounds=bounds) path = p.run() self.assertTrue(exists(path)) - self.assertEqual(map('{0:.2f}'.format, get_bounds(path)), map('{0:.2f}'.format, expected_bounds)) + for val, exp in zip(get_bounds(path), expected_bounds): + self.assertAlmostEqual(val, exp, 2) def test_simple_with_out_of_bounds_clip(self): @@ -82,7 +85,8 @@ class TestProcess(unittest.TestCase): bounds=bounds) path = p.run() self.assertTrue(exists(path)) - self.assertEqual(map('{0:.2f}'.format, get_bounds(path)), map('{0:.2f}'.format, expected_bounds)) + for val, exp in zip(get_bounds(path), expected_bounds): + self.assertAlmostEqual(val, exp, 2) def test_simple_with_zip_file(self): @@ -104,7 +108,8 @@ class TestProcess(unittest.TestCase): bounds=bounds) path = p.run() self.assertTrue(exists(path)) - self.assertEqual(map('{0:.2f}'.format, get_bounds(path)), map('{0:.2f}'.format, bounds)) + for val, exp in zip(get_bounds(path), bounds): + self.assertAlmostEqual(val, exp, 2) def test_ndvi(self): @@ -118,7 +123,8 @@ class TestProcess(unittest.TestCase): bounds=bounds) path = p.run() self.assertTrue(exists(path)) - self.assertEqual(map('{0:.2f}'.format, get_bounds(path)), map('{0:.2f}'.format, bounds)) + for val, exp in zip(get_bounds(path), bounds): + self.assertAlmostEqual(val, exp, 2) def test_ndvi_with_manual_colormap(self): diff --git a/tests/test_landsat.py b/tests/test_landsat.py index 4e046bd..844cc65 100644 --- a/tests/test_landsat.py +++ b/tests/test_landsat.py @@ -8,10 +8,10 @@ import unittest import subprocess import errno import shutil -import mock from os.path import join -from jsonschema import validate +from jsonschema import validate +import mock import landsat.landsat as landsat from tests import geojson_schema diff --git a/tests/test_mixins.py b/tests/test_mixins.py index eaa5831..e6ec769 100644 --- a/tests/test_mixins.py +++ b/tests/test_mixins.py @@ -3,9 +3,16 @@ """Tests for mixins""" +from __future__ import absolute_import + import sys import unittest -from cStringIO import StringIO + +try: + from io import StringIO +except: + from cStringIO import StringIO + from contextlib import contextmanager from landsat.mixins import VerbosityMixin @@ -30,45 +37,45 @@ class TestMixins(unittest.TestCase): def test_output(self): # just a value - with capture(self.v.output, 'this is a test') as output: + with capture(self.v.output, u'this is a test') as output: self.assertEquals("", output) # value as normal - with capture(self.v.output, 'this is a test', normal=True) as output: + with capture(self.v.output, u'this is a test', normal=True) as output: self.assertEquals("this is a test\n", output) # value as normal with color - with capture(self.v.output, 'this is a test', normal=True, color='blue') as output: + with capture(self.v.output, u'this is a test', normal=True, color='blue') as output: self.assertEquals("\x1b[34mthis is a test\x1b[0m\n", output) # value as error - with capture(self.v.output, 'this is a test', normal=True, error=True) as output: + with capture(self.v.output, u'this is a test', normal=True, error=True) as output: self.assertEquals("\x1b[31mthis is a test\x1b[0m\n", output) # value with arrow - with capture(self.v.output, 'this is a test', normal=True, arrow=True) as output: + with capture(self.v.output, u'this is a test', normal=True, arrow=True) as output: self.assertEquals("\x1b[34m===> \x1b[0mthis is a test\n", output) # value with indent - with capture(self.v.output, 'this is a test', normal=True, indent=1) as output: + with capture(self.v.output, u'this is a test', normal=True, indent=1) as output: self.assertEquals(" this is a test\n", output) def test_exit(self): with self.assertRaises(SystemExit): - with capture(self.v.exit, 'exit test') as output: + with capture(self.v.exit, u'exit test') as output: self.assertEquals('exit test', output) def test_print(self): # message in blue with arrow - with capture(self.v._print, msg='this is a test', color='blue', arrow=True) as output: + with capture(self.v._print, msg=u'this is a test', color='blue', arrow=True) as output: self.assertEquals("\x1b[34m===> \x1b[0m\x1b[34mthis is a test\x1b[0m\n", output) # just a message - with capture(self.v._print, msg='this is a test') as output: + with capture(self.v._print, msg=u'this is a test') as output: self.assertEquals("this is a test\n", output) # message with color and indent - with capture(self.v._print, msg='this is a test', color='blue', indent=1) as output: + with capture(self.v._print, msg=u'this is a test', color='blue', indent=1) as output: self.assertEquals(" \x1b[34mthis is a test\x1b[0m\n", output) diff --git a/tests/test_search.py b/tests/test_search.py index 6f141b3..792da6d 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -4,6 +4,7 @@ """Tests for search""" import unittest + from jsonschema import validate from landsat.search import Search diff --git a/tests/test_uploader.py b/tests/test_uploader.py index 055c86d..cdc38f7 100644 --- a/tests/test_uploader.py +++ b/tests/test_uploader.py @@ -34,11 +34,11 @@ class TestUploader(unittest.TestCase): class upload_tests(unittest.TestCase): def test_should_be_able_to_upload_data(self): - input = ['12', '345'] + input = [b'12', b'345'] state['mock_boto_s3_multipart_upload_data'] = [] conn = S3Connection('some_key', 'some_secret', True) upload('test_bucket', 'some_key', 'some_secret', input, 'some_key', connection=conn) - self.assertEqual(state['mock_boto_s3_multipart_upload_data'], ['12', '345']) + self.assertEqual(state['mock_boto_s3_multipart_upload_data'], [b'12', b'345']) class upload_part_tests(unittest.TestCase): @@ -57,36 +57,36 @@ class upload_part_tests(unittest.TestCase): counter[0] += 1 raise Exception() - upload_part(upload_func, '_', '_', '_') + upload_part(upload_func, b'_', b'_', b'_') self.assertEqual(counter[0], 5) class doc_collector_tests(unittest.TestCase): def test_should_be_able_to_read_every_byte_of_data(self): - input = ['12345'] + input = [b'12345'] result = list(data_collector(input, def_buf_size=3)) - self.assertEqual(result, ['123', '45']) + self.assertEqual(result, [b'123', b'45']) def test_should_be_able_to_read_single_yield(self): - input = ['123'] + input = [b'123'] result = list(data_collector(input, def_buf_size=3)) - self.assertEqual(result, ['123']) + self.assertEqual(result, [b'123']) def test_should_be_able_to_yield_data_less_than_buffer_size(self): - input = ['123'] + input = [b'123'] result = list(data_collector(input, def_buf_size=6)) - self.assertEqual(result, ['123']) + self.assertEqual(result, [b'123']) def test_a_single_item_should_still_be_buffered_even_if_it_is_above_the_buffer_size(self): - input = ['123456'] + input = [b'123456'] result = list(data_collector(input, def_buf_size=3)) - self.assertEqual(result, ['123', '456']) + self.assertEqual(result, [b'123', b'456']) def test_should_return_rest_of_data_on_last_iteration(self): - input = ['1234', '56'] + input = [b'1234', b'56'] result = list(data_collector(input, def_buf_size=3)) - self.assertEqual(result, ['123', '456']) + self.assertEqual(result, [b'123', b'456']) if __name__ == '__main__': unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e2c4c2f --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +envlist = + py27 + py35 + +[testenv] +deps = + jsonschema + mock>=1.3.0 + nose>=1.3.7 + pytest +commands = + py.test From 184a0943dd688c55a730550464a823422618bcac Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 16:34:11 -0400 Subject: [PATCH 25/32] tox tests --- MANIFEST.in | 2 ++ tox.ini | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 23d7d34..97a1d9d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,8 @@ include AUTHORS.txt include LICENSE include README.md +include requirements.txt +include requirements-dev.txt recursive-include tests * recursive-exclude * __pycache__ diff --git a/tox.ini b/tox.ini index e2c4c2f..7a00349 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,16 @@ [tox] -envlist = - py27 - py35 +envlist = py27,py34,py35 [testenv] deps = + wheel + pip>=8.1.1 jsonschema mock>=1.3.0 nose>=1.3.7 pytest commands = - py.test + pip install -r requirements.txt + pip install -e . + python setup.py test +install_command=pip install --process-dependency-links --allow-external --allow-unverified {opts} {packages} From e857fda80a5e0f64e7d1ecc4fd2130c2bcc7e7a7 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 16:36:46 -0400 Subject: [PATCH 26/32] use tox for tests --- circle.yml | 9 +++------ tox.ini | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 71dc25e..cff9446 100644 --- a/circle.yml +++ b/circle.yml @@ -6,17 +6,14 @@ dependencies: pre: - sudo apt-get -y update - sudo apt-get install -f --yes libgdal-dev - - pip install setuptools + - pip install setuptools>=20.3.1 - 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 . + - pip install tox>=2.3.1 test: override: - - python setup.py test + - tox deployment: diff --git a/tox.ini b/tox.ini index 7a00349..426378a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = py27,py34,py35 [testenv] deps = wheel + cython>=0.21 pip>=8.1.1 jsonschema mock>=1.3.0 From 93c126d53590636af31e304a79931fa58cec45f5 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 16:57:00 -0400 Subject: [PATCH 27/32] switch back to travis circleci doesn't support multiple python versions --- .travis.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ circle.yml | 26 -------------------------- 2 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 .travis.yml delete mode 100644 circle.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..aed8881 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,44 @@ +language: python +sudo: false + +python: + - '2.7' + - '3.4' + - '3.5' + +cache: + directories: + - ~/.cache/pip + + +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= + - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels + - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels + +before_install: + - pip install -U pip + - pip install wheel + + +install: + - pip wheel -r requirements-dev.txt + - pip install -r requirements-dev.txt + - pip install -e . + + +script: +- python setup.py test + +deploy: + provider: pypi + user: devseed + password: + secure: WtawFW/999XYszmZfj1Qk82l00OSyP2JBVOOGCERrW1gVO7MYtYsgP31HKRSzNTCTHJNVDpdK4WZWY6zPQqC3l2UfWYYsvRn0hCoI8AJxE5VCUEg6Ccpe6fMJuhp1pq6Zy7yrfBSZcOB9aqSHLBJsunD2o3mNlTC8WV8vNK74ck= + on: + repo: developmentseed/landsat-util + branch: + - master diff --git a/circle.yml b/circle.yml deleted file mode 100644 index cff9446..0000000 --- a/circle.yml +++ /dev/null @@ -1,26 +0,0 @@ -machine: - python: - version: 2.7.10 - -dependencies: - pre: - - sudo apt-get -y update - - sudo apt-get install -f --yes libgdal-dev - - pip install setuptools>=20.3.1 - - pip install -U pip - - pip install wheel - - pip install tox>=2.3.1 - -test: - override: - - tox - - -deployment: - production: - branch: master - commands: - - echo "[pypi]" > ~/.pypirc - - echo "username:" $PYPI_USERNAME >> ~/.pypirc - - echo "password:" $PYPI_PASSWORD >> ~/.pypirc - - make release From 64c6754e544e7d67db21cc280223446d200f656a Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 17:04:15 -0400 Subject: [PATCH 28/32] addon libs --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index aed8881..248acac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,18 @@ cache: directories: - ~/.cache/pip +addons: + apt: + packages: + - libgdal1h + - gdal-bin + - libproj-dev + - libhdf5-serial-dev + - libpng-dev + - libgdal-dev + - libatlas-dev + - libatlas-base-dev + - gfortran env: global: From a331b2ec727bfab193a1957353d6bc9c5d455888 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 17:24:09 -0400 Subject: [PATCH 29/32] remove python 3.4 tests --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 248acac..7420186 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ sudo: false python: - '2.7' - - '3.4' - '3.5' cache: @@ -37,7 +36,6 @@ before_install: install: - - pip wheel -r requirements-dev.txt - pip install -r requirements-dev.txt - pip install -e . From c4edd8fa953213f9920adffd6b3102aaa272d92a Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 17:30:52 -0400 Subject: [PATCH 30/32] version 0.13.0 --- landsat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landsat/__init__.py b/landsat/__init__.py index 92a60bd..2d7893e 100644 --- a/landsat/__init__.py +++ b/landsat/__init__.py @@ -1 +1 @@ -__version__ = '0.12.2' +__version__ = '0.13.0' From 030037dce71817d25037139c71c6ff43a2dc8acd Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 17:32:46 -0400 Subject: [PATCH 31/32] update changes and authors --- AUTHORS.txt | 1 + CHANGES.txt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 20bd3c7..8bb02d1 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -4,6 +4,7 @@ Authors Scisco https://github.com/scisco Marc Farra https://github.com/kamicut Drew Bollinger https://github.com/drewbo +Sean Gillies https://github.com/sgillies Alex Kappel https://twitter.com/alex_kappel See also https://github.com/developmentseed/landsat-util/graphs/contributors. diff --git a/CHANGES.txt b/CHANGES.txt index c591502..ca08010 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,11 @@ Changes ======= -0.12.2 (2016-02-18) +0.13.0 (2016-03-25) +------------------ +- Python 3.5 support + +0.12.2 (2016-03-24) ------------------ - Fix for #167 - Fix for #145 From d8441954f33da90f1b1c00142452223e6c5f1222 Mon Sep 17 00:00:00 2001 From: Scisco Date: Fri, 25 Mar 2016 17:35:19 -0400 Subject: [PATCH 32/32] switch back to use badge --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index dd859cf..0e29372 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ Landsat-util =============== -.. image:: https://circleci.com/gh/developmentseed/landsat-util/tree/develop.svg?style=svg - :target: https://circleci.com/gh/developmentseed/landsat-util/tree/develop +.. image:: https://travis-ci.org/developmentseed/landsat-util.svg?branch=master + :target: https://travis-ci.org/developmentseed/landsat-util .. image:: https://badge.fury.io/py/landsat-util.svg :target: http://badge.fury.io/py/landsat-util