From 9612fa6aa84abdc1501f6ee69d4c60ad5654ac81 Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:14:55 -0300 Subject: [PATCH 1/7] renamed to a standard name --- requirements_tests.txt => requirements-dev.txt | 4 ---- 1 file changed, 4 deletions(-) rename requirements_tests.txt => requirements-dev.txt (82%) diff --git a/requirements_tests.txt b/requirements-dev.txt similarity index 82% rename from requirements_tests.txt rename to requirements-dev.txt index 2849288..c03958a 100644 --- a/requirements_tests.txt +++ b/requirements-dev.txt @@ -1,4 +1,3 @@ --r requirements.txt pytest pytest-cov mock @@ -10,6 +9,3 @@ pymssql psycopg2 #pyspatialite #mysql-python - - - From cacf6fa40de4cc248eacbcbdddf74674ffa3d223 Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:17:33 -0300 Subject: [PATCH 2/7] cleaned unsused dependencies --- requirements.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index d78fe04..7e74829 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,3 @@ pyodbc -six sqlalchemy -#-e git+https://github.com/ODM2/geoalchemy.git@v0.7.4#egg=geoalchemy-0.7.4 -#shapely pandas -#psycopg2 # Commented out because I could not pip install it. From f5072eb2a0dcce63e83cd5630577fa4db7d9965d Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:18:02 -0300 Subject: [PATCH 3/7] added dev dependencies from Travis-CI and requirements.txt here --- requirements-dev.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index c03958a..8bf598c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,3 +9,5 @@ pymssql psycopg2 #pyspatialite #mysql-python +pymssql +psycopg2 From d2aaac8d253f0802071657e62071187dbfe69134 Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:18:30 -0300 Subject: [PATCH 4/7] let requirements-dev.txt and requirements.txt keep track of these --- setup.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/setup.py b/setup.py index 53bc97e..be2d498 100644 --- a/setup.py +++ b/setup.py @@ -88,19 +88,6 @@ # https://packaging.python.org/en/latest/requirements.html install_requires=install_reqs, - # install_requires=[ - # 'pyodbc', - # 'six', - # 'sqlalchemy', - # 'geoalchemy>=0.7.3', - # 'shapely', - # 'pandas', - # ], - # dependency_links- geoalchemy from the ODM repository - dependency_links=[ - "git+https://github.com/ODM2/geoalchemy.git@v0.7.4#egg=geoalchemy-0.7.4" - ], - # List additional groups of dependencies here (e.g. development # dependencies). You can install these using the following syntax, # for example: From c6b8804ed5a3ce2ba020ccb9f682e19306aa4692 Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:18:46 -0300 Subject: [PATCH 5/7] Leaner Travis-CI configuration. --- .travis.yml | 90 +++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/.travis.yml b/.travis.yml index f767789..a0d942b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,67 +1,69 @@ -git blanguage: python -sudo: required -# if the https://travis-ci.org/ODM2/ODM2PythonAPI/requests ever says: missing config -# validate at: http://lint.travis-ci.org/ -python: -# - "2.6" - - "2.7" -# - "3.2" -# - "3.3" -# - "3.4" -# - "3.5" -# - "3.5-dev" # 3.5 development branch -# - "nightly" # currently points to 3.6-dev -# command to install dependencies -cache: - directories: - - $HOME/.cache/pip/wheels - - $HOME/virtualenv/python2.7.9 +language: python + +sudo: false + services: - mysql - postgresql + addons: apt: packages: - - cmake - - unixodbc - - unixodbc-dev + # FIXME: When activating the services above I don't think these are needed. - odbcinst1debian2 - odbcinst - - freetds-dev - - freetds-bin - tdsodbc - - libc6 - e2fsprogs + # FIXME: the dependencies below can probably be replaced by conda. + - libc6 + - freetds-dev + - freetds-bin + - unixodbc + - unixodbc-dev - mysql-client + # FIXME: I don't see the need for these anywhere. + - cmake - libproj-dev - libgeos-dev - libspatialite-dev -# mariadb: '10.1' + +matrix: + fast_finish: true + include: + - python: 2.7 + env: TEST_TARGET=default + - python: 3.5 + env: TEST_TARGET=default + - python: 2.7 + env: TEST_TARGET=coding_standards + allow_failures: + - python: 2.7 + env: TEST_TARGET=coding_standards + - python: 3.5 + env: TEST_TARGET=default + before_script: - ./ci-helpers/mysql_setup.sh - ./ci-helpers/postgres_setup.sh - ./ci-helpers/travis/freetds.sh - before_install: -# python -m pip makes the install go into the virtualenv - - sudo pip install --upgrade pip - - sudo python -m pip install pandas - - export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1;sudo python -m pip install pymssql -# - python -m pip install mysql-python -install: # now just our code - - sudo pip install -e git+https://github.com/ODM2/geoalchemy.git@v0.7.4#egg=geoalchemy-0.7.4 - - python -m pip install . - - python -m pip install -r requirements_tests.txt --allow-external pyodbc --allow-unverified pyodbc - # pysqlite -# - pip install pysqlite - - pip list + - wget http://bit.ly/miniconda -O miniconda.sh + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - conda update --yes --all + - conda config --add channels conda-forge --force + - conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt + - source activate TEST -# don't forget to open up the azure mssql server to these addreses -# https://docs.travis-ci.com/user/ip-addresses/ +# Test source distribution. +install: + - python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install odm2api-${version}.tar.gz && popd -# command to run tests script: - - - py.test - + - if [[ $TEST_TARGET == 'default' ]]; then + py.test -vv ; + fi + - if [[ $TEST_TARGET == 'coding_standards' ]]; then + find . -type f -name "*.py" ! -name 'conf.py' | xargs flake8 --max-line-length=100 ; + fi From d21e412816331737dbd91d7e681b1aa9071fe58e Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:29:34 -0300 Subject: [PATCH 6/7] add flake8 --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 8bf598c..e2f4c01 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,3 +11,4 @@ psycopg2 #mysql-python pymssql psycopg2 +flake8 From a7942df0ad4cd196bd8a3cf383409668f7b25904 Mon Sep 17 00:00:00 2001 From: ocefpaf Date: Wed, 15 Mar 2017 10:31:07 -0300 Subject: [PATCH 7/7] add major py3k versions --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a0d942b..7e041b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ services: addons: apt: packages: - # FIXME: When activating the services above I don't think these are needed. + # FIXME: when activating the services above I don't think these are needed. - odbcinst1debian2 - odbcinst - tdsodbc @@ -32,15 +32,23 @@ matrix: include: - python: 2.7 env: TEST_TARGET=default + - python: 3.4 + env: TEST_TARGET=default - python: 3.5 env: TEST_TARGET=default + - python: 3.6 + env: TEST_TARGET=default - python: 2.7 env: TEST_TARGET=coding_standards allow_failures: - python: 2.7 env: TEST_TARGET=coding_standards + - python: 3.4 + env: TEST_TARGET=default - python: 3.5 env: TEST_TARGET=default + - python: 3.6 + env: TEST_TARGET=default before_script: - ./ci-helpers/mysql_setup.sh