From 0164e1961a6650db067c437409cc35e6c12495b3 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:14:07 -0400 Subject: [PATCH 01/29] tox --- .travis.yml | 95 +++++++++++++++++++++++---- requirements/requirements-testing.txt | 11 ++++ tox.ini | 57 ++++++++++++++++ 3 files changed, 150 insertions(+), 13 deletions(-) create mode 100644 requirements/requirements-testing.txt create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index ede106a..3c91fbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,92 @@ -sudo: true +#sudo: true +#language: python +#python: +# - '3.5' +# - '3.6' +#env: +# global: +# - DB=postgres +# matrix: +# - DJANGO=">=1.11,<2.0" +# - DJANGO=">=2.0,<2.1" +#addons: +# postgresql: '9.5' +#install: +# - pip install -q coverage coveralls flake8 Django$DJANGO django-nose>=1.4 +#before_script: +# - psql -c 'CREATE DATABASE querybuilder;' -U postgres +#script: +# - flake8 ./querybuilder +# - coverage run setup.py test +# - coverage report --fail-under=90 +#after_success: +# coveralls +# +# +# +# + language: python +cache: pip + python: - - '3.5' - - '3.6' + - "2.7" + - "3.4" + - "3.5" + +sudo: false + env: - global: + - DJANGO=1.10 + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master - DB=postgres - matrix: - - DJANGO=">=1.11,<2.0" - - DJANGO=">=2.0,<2.1" + addons: postgresql: '9.5' + +matrix: + fast_finish: true + include: +# - { python: "3.6", env: DJANGO=master } + - { python: "3.6", env: DJANGO=1.11 } +# - { python: "3.6", env: DJANGO=2.0 } +# - { python: "2.7", env: TOXENV=lint } +# - { python: "2.7", env: TOXENV=docs } + +# - python: "3.6" +# env: TOXENV=dist +# script: +# - python setup.py bdist_wheel +# - tox --installpkg ./dist/djangorestframework-*.whl +# - tox # test sdist +# +# - python: "3.6" +# env: TOXENV=readme +# addons: +# apt_packages: pandoc + +# exclude: +# - { python: "2.7", env: DJANGO=master } +# - { python: "2.7", env: DJANGO=2.0 } +# - { python: "3.4", env: DJANGO=master } + +# allow_failures: +# - env: DJANGO=master + install: - - pip install -q coverage coveralls flake8 Django$DJANGO django-nose>=1.4 + - pip install tox tox-travis + before_script: - psql -c 'CREATE DATABASE querybuilder;' -U postgres + script: - - flake8 ./querybuilder - - coverage run setup.py test - - coverage report --fail-under=90 -after_success: - coveralls + - tox + +#after_success: +# - pip install codecov +# - codecov -e TOXENV,DJANGO + +notifications: + email: false diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt new file mode 100644 index 0000000..d79fd30 --- /dev/null +++ b/requirements/requirements-testing.txt @@ -0,0 +1,11 @@ +pytz +fleming +six +psycopg2 +django-nose>=1.4 +django-dynamic-fixture +jsonfield==0.9.20 +mock +coverage +coveralls +flake8 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..6fac086 --- /dev/null +++ b/tox.ini @@ -0,0 +1,57 @@ +;[pytest] +;addopts=--tb=short + +[tox] +envlist = + {py27,py34,py35}-django110, + {py27,py34,py35,py36}-django111, + {py34,py35,py36}-django20, + {py35,py36}-djangomaster, +; dist,lint,docs,readme, + +[travis:env] +DJANGO = + 1.10: django110 + 1.11: django111 + 2.0: django20 + master: djangomaster + +[testenv] +;commands = ./runtests.py --fast {posargs} --coverage -rw +commands = ./manage.py test querybuilder +envdir = {toxworkdir}/venvs/{envname} +setenv = + PYTHONDONTWRITEBYTECODE=1 + PYTHONWARNINGS=once +deps = + django110: Django>=1.10,<1.11 + django111: Django>=1.11,<2.0 + django20: Django>=2.0,<2.1 + djangomaster: https://github.com/django/django/archive/master.tar.gz + -requirements/requirements-testing.txt + +;[testenv:dist] +;commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw +;deps = +; django +; -rrequirements/requirements-testing.txt +; -rrequirements/requirements-optionals.txt + +;[testenv:lint] +;basepython = python2.7 +;commands = ./runtests.py --lintonly +;deps = +; -rrequirements/requirements-codestyle.txt +; -rrequirements/requirements-testing.txt +; +;[testenv:docs] +;basepython = python2.7 +;commands = mkdocs build +;deps = +; -rrequirements/requirements-testing.txt +; -rrequirements/requirements-documentation.txt +; +;[testenv:readme] +;commands = ./setup.py check -rs +;deps = +; -rrequirements/requirements-packaging.txt From 9c13f426e4013be9aa3e153ede2a413c689f1576 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:15:22 -0400 Subject: [PATCH 02/29] comment out db --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c91fbb..0439122 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ env: - DJANGO=1.11 - DJANGO=2.0 - DJANGO=master - - DB=postgres +# - DB=postgres addons: postgresql: '9.5' From 1d9dc0e5945eabd75dddb3dadc76b054c27a37ca Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:16:09 -0400 Subject: [PATCH 03/29] deps --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6fac086..4435449 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ deps = django111: Django>=1.11,<2.0 django20: Django>=2.0,<2.1 djangomaster: https://github.com/django/django/archive/master.tar.gz - -requirements/requirements-testing.txt + -r requirements/requirements-testing.txt ;[testenv:dist] ;commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw From bc1694a5087aba286a13fa8dfcebbb6bf872e227 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:27:41 -0400 Subject: [PATCH 04/29] requirements --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 4435449..73821e1 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ deps = django111: Django>=1.11,<2.0 django20: Django>=2.0,<2.1 djangomaster: https://github.com/django/django/archive/master.tar.gz - -r requirements/requirements-testing.txt + -rrequirements/requirements-testing.txt ;[testenv:dist] ;commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw From ef104f4b2d2c031698f1632f554fe737733126f3 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:38:13 -0400 Subject: [PATCH 05/29] coverage run --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 73821e1..fbeff92 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ DJANGO = [testenv] ;commands = ./runtests.py --fast {posargs} --coverage -rw -commands = ./manage.py test querybuilder +commands = coverage run setup.py test envdir = {toxworkdir}/venvs/{envname} setenv = PYTHONDONTWRITEBYTECODE=1 From 1c22b8d7cc35f3684592ec09c8e377f74223b10e Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 17:52:56 -0400 Subject: [PATCH 06/29] db env --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0439122..3e1fb6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,8 @@ env: - DJANGO=1.11 - DJANGO=2.0 - DJANGO=master -# - DB=postgres + global: + - DB=postgres addons: postgresql: '9.5' From c4c0a873d7d131ee7e85e3dc8e42e8e1c185e1d1 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 18:01:45 -0400 Subject: [PATCH 07/29] hello? --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3e1fb6c..50b3bef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ env: - DJANGO=master global: - DB=postgres +# hello? addons: postgresql: '9.5' From 8723a5014e49e5b6c279157248d60431bc23f5a8 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 23 Mar 2018 18:17:47 -0400 Subject: [PATCH 08/29] travis? --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50b3bef..18641a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,9 +41,8 @@ env: - DJANGO=1.11 - DJANGO=2.0 - DJANGO=master - global: - - DB=postgres -# hello? +# global: +# - DB=postgres addons: postgresql: '9.5' From bf9a3369c4eba3a68266a69853a8755f699c44c8 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 12:23:47 -0400 Subject: [PATCH 09/29] update tox ini --- .gitignore | 2 ++ .travis.yml | 9 +++++---- requirements/requirements-testing.txt | 1 - tox.ini | 29 ++++++++++----------------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index cc16f31..a170e49 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ docs/_build/ # Test database test_ambition_dev + +.tox/ diff --git a/.travis.yml b/.travis.yml index 18641a9..70b533e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ python: - "2.7" - "3.4" - "3.5" + - "3.6" sudo: false @@ -47,11 +48,11 @@ env: addons: postgresql: '9.5' -matrix: - fast_finish: true - include: +#matrix: +# fast_finish: true +# include: # - { python: "3.6", env: DJANGO=master } - - { python: "3.6", env: DJANGO=1.11 } +# - { python: "3.6", env: DJANGO=1.11 } # - { python: "3.6", env: DJANGO=2.0 } # - { python: "2.7", env: TOXENV=lint } # - { python: "2.7", env: TOXENV=docs } diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index d79fd30..6a11970 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -8,4 +8,3 @@ jsonfield==0.9.20 mock coverage coveralls -flake8 diff --git a/tox.ini b/tox.ini index fbeff92..f077f17 100644 --- a/tox.ini +++ b/tox.ini @@ -3,11 +3,12 @@ [tox] envlist = - {py27,py34,py35}-django110, - {py27,py34,py35,py36}-django111, - {py34,py35,py36}-django20, - {py35,py36}-djangomaster, -; dist,lint,docs,readme, + {py27,py34,py35}-django110, + {py27,py34,py35,py36}-django111, + {py34,py35,py36}-django20, + {py35,py36}-djangomaster, + flake8 +; docs,readme, [travis:env] DJANGO = @@ -30,19 +31,11 @@ deps = djangomaster: https://github.com/django/django/archive/master.tar.gz -rrequirements/requirements-testing.txt -;[testenv:dist] -;commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw -;deps = -; django -; -rrequirements/requirements-testing.txt -; -rrequirements/requirements-optionals.txt - -;[testenv:lint] -;basepython = python2.7 -;commands = ./runtests.py --lintonly -;deps = -; -rrequirements/requirements-codestyle.txt -; -rrequirements/requirements-testing.txt +[testenv:flake8] +basepython = python2.7 +commands = flake8 ./querybuilder +deps = + flake8 ; ;[testenv:docs] ;basepython = python2.7 From 8347532e839715a4ccfdd25b55f4b6e3b23e997c Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 14:53:26 -0400 Subject: [PATCH 10/29] update travis tox --- .travis.yml | 27 +++++++++++++++----------- tox.ini | 56 ++++++++++++++++++++++++++--------------------------- 2 files changed, 44 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index 70b533e..800979e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,28 +27,33 @@ # language: python -cache: pip +#cache: pip python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" + - "2.7" + - "3.4" + - "3.5" + - "3.6" sudo: false env: - - DJANGO=1.10 - - DJANGO=1.11 - - DJANGO=2.0 - - DJANGO=master + - DJANGO=1.10 + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master + + # global: # - DB=postgres addons: postgresql: '9.5' -#matrix: +matrix: + include: + - { python: 3.6, env: TOXENV=flake8 } + # fast_finish: true # include: # - { python: "3.6", env: DJANGO=master } @@ -78,7 +83,7 @@ addons: # - env: DJANGO=master install: - - pip install tox tox-travis + - pip install tox-travis before_script: - psql -c 'CREATE DATABASE querybuilder;' -U postgres diff --git a/tox.ini b/tox.ini index f077f17..81a9aa1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,33 @@ -;[pytest] -;addopts=--tb=short - [tox] envlist = - {py27,py34,py35}-django110, - {py27,py34,py35,py36}-django111, - {py34,py35,py36}-django20, - {py35,py36}-djangomaster, - flake8 -; docs,readme, + flake8 + py{27,34,35}-django110 + py{27,34,35,36}-django111 + py{34,35,36}-django20 + {py35,py36}-djangomaster + +[testenv] +deps = + django110: Django>=1.10,<1.11 + django111: Django>=1.11,<2.0 + django20: Django>=2.0,<2.1 + djangomaster: https://github.com/django/django/archive/master.tar.gz + -rrequirements/requirements-testing.txt +commands = + coverage run setup.py test + coverage report --fail-under=90 + +;setenv = +; PYTHONPATH={toxinidir} +;envdir = {toxworkdir}/venvs/{envname} +;setenv = +; PYTHONDONTWRITEBYTECODE=1 +; PYTHONWARNINGS=once + +[testenv:flake8] +deps = flake8 +commands = flake8 + [travis:env] DJANGO = @@ -17,25 +36,6 @@ DJANGO = 2.0: django20 master: djangomaster -[testenv] -;commands = ./runtests.py --fast {posargs} --coverage -rw -commands = coverage run setup.py test -envdir = {toxworkdir}/venvs/{envname} -setenv = - PYTHONDONTWRITEBYTECODE=1 - PYTHONWARNINGS=once -deps = - django110: Django>=1.10,<1.11 - django111: Django>=1.11,<2.0 - django20: Django>=2.0,<2.1 - djangomaster: https://github.com/django/django/archive/master.tar.gz - -rrequirements/requirements-testing.txt - -[testenv:flake8] -basepython = python2.7 -commands = flake8 ./querybuilder -deps = - flake8 ; ;[testenv:docs] ;basepython = python2.7 From 903e0d5d7e58a9f24009f403d4281b2ff9309e89 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:06:29 -0400 Subject: [PATCH 11/29] testing db --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 800979e..2b16f1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ python: sudo: false env: + - DB=postgres - DJANGO=1.10 - DJANGO=1.11 - DJANGO=2.0 From 1ed03354aba64c8e16774f30a1faf203b8ee99ff Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:07:37 -0400 Subject: [PATCH 12/29] postgres service --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b16f1a..1e876cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,10 @@ python: sudo: false +services: + - postgresql + env: - - DB=postgres - DJANGO=1.10 - DJANGO=1.11 - DJANGO=2.0 From e28b8baf98756246e1f07af405ee9471ffdabeef Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:11:00 -0400 Subject: [PATCH 13/29] global db env --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e876cb..336bc5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,15 +41,13 @@ services: - postgresql env: + global: + - DB=postgres - DJANGO=1.10 - DJANGO=1.11 - DJANGO=2.0 - DJANGO=master - -# global: -# - DB=postgres - addons: postgresql: '9.5' From c9b1327737c45343b63ae61979cb72e8452ce3b4 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:15:14 -0400 Subject: [PATCH 14/29] don't need services --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 336bc5d..9bb6964 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,6 @@ python: sudo: false -services: - - postgresql - env: global: - DB=postgres From a153dc6ede8a1e9bc8ab6af50d5d9d8aab12e754 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:18:20 -0400 Subject: [PATCH 15/29] fixing global --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9bb6964..b62d403 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,10 @@ python: sudo: false +global: + - DB=postgres + env: - global: - - DB=postgres - DJANGO=1.10 - DJANGO=1.11 - DJANGO=2.0 From eaff6d066aea8d655f9a354e4fb7a4fd816a6536 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:26:48 -0400 Subject: [PATCH 16/29] fix global --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b62d403..6116d34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,14 +37,14 @@ python: sudo: false -global: - - DB=postgres - env: - - DJANGO=1.10 - - DJANGO=1.11 - - DJANGO=2.0 - - DJANGO=master + global: + - DB=postgres + matrix: + - DJANGO=1.10 + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master addons: postgresql: '9.5' From a06ccb34020fa72fe5d62f3d8df62f63b6209b5e Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:29:07 -0400 Subject: [PATCH 17/29] add to matrix too? --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6116d34..c7ddaaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,10 +41,10 @@ env: global: - DB=postgres matrix: - - DJANGO=1.10 - - DJANGO=1.11 - - DJANGO=2.0 - - DJANGO=master + - DJANGO=1.10 DB=postgres + - DJANGO=1.11 DB=postgres + - DJANGO=2.0 DB=postgres + - DJANGO=master DB=postgres addons: postgresql: '9.5' From 337c976924e4ee189b742938998b9874fe008fdc Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:47:24 -0400 Subject: [PATCH 18/29] sudo true --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7ddaaa..3ec1d94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -#sudo: true +sudo: true #language: python #python: # - '3.5' @@ -35,16 +35,16 @@ python: - "3.5" - "3.6" -sudo: false +#sudo: false env: global: - DB=postgres matrix: - - DJANGO=1.10 DB=postgres - - DJANGO=1.11 DB=postgres - - DJANGO=2.0 DB=postgres - - DJANGO=master DB=postgres + - DJANGO=1.10 + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master addons: postgresql: '9.5' From 600454f12e5a15640f97e90023208d599ed1ad74 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:48:27 -0400 Subject: [PATCH 19/29] print --- settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/settings.py b/settings.py index f92d61d..1e7243d 100644 --- a/settings.py +++ b/settings.py @@ -9,6 +9,10 @@ def configure_settings(): """ if not settings.configured: # Determine the database settings depending on if a test_db var is set in CI mode or not + print('-' * 20) + print('os environ') + print(os.environ) + print(os.environ.get('DB')) test_db = os.environ.get('DB', None) if test_db is None: db_config = { From bf955ab819482b7fea52a275c50b177a19af89d8 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 15:58:24 -0400 Subject: [PATCH 20/29] more print --- settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/settings.py b/settings.py index 1e7243d..15939a1 100644 --- a/settings.py +++ b/settings.py @@ -3,10 +3,16 @@ from django.conf import settings +print('this is the settings file') +print(os.environ) + + def configure_settings(): """ Configures settings for manage.py and for run_tests.py. """ + print('this is the configure settings') + print(os.environ) if not settings.configured: # Determine the database settings depending on if a test_db var is set in CI mode or not print('-' * 20) From 457c5615d5857c3b29ecb610767a86a402d8536c Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:06:08 -0400 Subject: [PATCH 21/29] setenv in tox --- .travis.yml | 2 -- tox.ini | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ec1d94..6901c36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,8 +38,6 @@ python: #sudo: false env: - global: - - DB=postgres matrix: - DJANGO=1.10 - DJANGO=1.11 diff --git a/tox.ini b/tox.ini index 81a9aa1..41750cf 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,8 @@ envlist = {py35,py36}-djangomaster [testenv] +setenv = + DB = postgres deps = django110: Django>=1.10,<1.11 django111: Django>=1.11,<2.0 From 9d83ce1fd40a38d3cf156b0a21eb39f61fe3f909 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:13:41 -0400 Subject: [PATCH 22/29] checking if this will error --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 41750cf..ed5afe0 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = flake8 py{27,34,35}-django110 py{27,34,35,36}-django111 - py{34,35,36}-django20 + py{27,34,35,36}-django20 {py35,py36}-djangomaster [testenv] From a4f2dfc6da9acbe23cf12afa58220a680bbe66dc Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:16:27 -0400 Subject: [PATCH 23/29] flake8 only project --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ed5afe0..6ae2263 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ commands = [testenv:flake8] deps = flake8 -commands = flake8 +commands = flake8 querybuilder [travis:env] From 565bdf2b2c5b40d43c62f6496c78224fa4b12e3d Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:18:12 -0400 Subject: [PATCH 24/29] seeing if tox travis is required --- .travis.yml | 2 +- settings.py | 10 ---------- tox.ini | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6901c36..006108f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,7 +80,7 @@ matrix: # - env: DJANGO=master install: - - pip install tox-travis + - pip install tox before_script: - psql -c 'CREATE DATABASE querybuilder;' -U postgres diff --git a/settings.py b/settings.py index 15939a1..f92d61d 100644 --- a/settings.py +++ b/settings.py @@ -3,22 +3,12 @@ from django.conf import settings -print('this is the settings file') -print(os.environ) - - def configure_settings(): """ Configures settings for manage.py and for run_tests.py. """ - print('this is the configure settings') - print(os.environ) if not settings.configured: # Determine the database settings depending on if a test_db var is set in CI mode or not - print('-' * 20) - print('os environ') - print(os.environ) - print(os.environ.get('DB')) test_db = os.environ.get('DB', None) if test_db is None: db_config = { diff --git a/tox.ini b/tox.ini index 6ae2263..1027b7f 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = flake8 py{27,34,35}-django110 py{27,34,35,36}-django111 - py{27,34,35,36}-django20 + py{34,35,36}-django20 {py35,py36}-djangomaster [testenv] From 23c7f920d8efe634b1f183f4ca40c9969b2c0d52 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:23:28 -0400 Subject: [PATCH 25/29] use tox travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 006108f..6901c36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,7 +80,7 @@ matrix: # - env: DJANGO=master install: - - pip install tox + - pip install tox-travis before_script: - psql -c 'CREATE DATABASE querybuilder;' -U postgres From 2c44decedabf11ad59b979b25600e8a4aee5a90a Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:52:07 -0400 Subject: [PATCH 26/29] cleaning up --- .travis.yml | 47 ++++++++++--------------------------------- docs/contributing.rst | 5 ++++- requirements/docs.txt | 1 + tox.ini | 11 +--------- 4 files changed, 17 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6901c36..5b67bf7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,12 +19,6 @@ sudo: true # - flake8 ./querybuilder # - coverage run setup.py test # - coverage report --fail-under=90 -#after_success: -# coveralls -# -# -# -# language: python #cache: pip @@ -49,35 +43,17 @@ addons: matrix: include: - - { python: 3.6, env: TOXENV=flake8 } + - { python: "3.6", env: TOXENV=flake8 } +# - { python: "3.6", env: TOXENV=docs } -# fast_finish: true -# include: -# - { python: "3.6", env: DJANGO=master } -# - { python: "3.6", env: DJANGO=1.11 } -# - { python: "3.6", env: DJANGO=2.0 } -# - { python: "2.7", env: TOXENV=lint } -# - { python: "2.7", env: TOXENV=docs } + exclude: + - { python: "2.7", env: DJANGO=master } + - { python: "2.7", env: DJANGO=2.0 } + - { python: "3.4", env: DJANGO=master } + - { python: "3.6", env: DJANGO=1.10 } -# - python: "3.6" -# env: TOXENV=dist -# script: -# - python setup.py bdist_wheel -# - tox --installpkg ./dist/djangorestframework-*.whl -# - tox # test sdist -# -# - python: "3.6" -# env: TOXENV=readme -# addons: -# apt_packages: pandoc - -# exclude: -# - { python: "2.7", env: DJANGO=master } -# - { python: "2.7", env: DJANGO=2.0 } -# - { python: "3.4", env: DJANGO=master } - -# allow_failures: -# - env: DJANGO=master + allow_failures: + - env: DJANGO=master install: - pip install tox-travis @@ -88,9 +64,8 @@ before_script: script: - tox -#after_success: -# - pip install codecov -# - codecov -e TOXENV,DJANGO +after_success: + coveralls notifications: email: false diff --git a/docs/contributing.rst b/docs/contributing.rst index 08bbab2..fa91c23 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -67,7 +67,10 @@ Before a new release, please go through the following checklist: * Upload to pypi:: pip install wheel - python setup.py sdist bdist_wheel upload + pip install twine + python setup.py clean --all + python setup.py register sdist bdist_wheel + twine upload dist/* Vulnerability Reporting ----------------------- diff --git a/requirements/docs.txt b/requirements/docs.txt index 830e0fb..7a6c865 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,2 +1,3 @@ Sphinx>=1.2.2 sphinx_rtd_theme +coveralls diff --git a/tox.ini b/tox.ini index 1027b7f..5a143e1 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py{27,34,35}-django110 py{27,34,35,36}-django111 py{34,35,36}-django20 - {py35,py36}-djangomaster + py{35,36}-djangomaster [testenv] setenv = @@ -19,18 +19,10 @@ commands = coverage run setup.py test coverage report --fail-under=90 -;setenv = -; PYTHONPATH={toxinidir} -;envdir = {toxworkdir}/venvs/{envname} -;setenv = -; PYTHONDONTWRITEBYTECODE=1 -; PYTHONWARNINGS=once - [testenv:flake8] deps = flake8 commands = flake8 querybuilder - [travis:env] DJANGO = 1.10: django110 @@ -38,7 +30,6 @@ DJANGO = 2.0: django20 master: djangomaster -; ;[testenv:docs] ;basepython = python2.7 ;commands = mkdocs build From 8690a551ef653be2b510dc113a1254885a76c422 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Mon, 26 Mar 2018 16:55:34 -0400 Subject: [PATCH 27/29] more cleanup --- .travis.yml | 28 ++-------------------------- requirements/docs.txt | 1 - tox.ini | 12 ------------ 3 files changed, 2 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b67bf7..88bf443 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,6 @@ -sudo: true -#language: python -#python: -# - '3.5' -# - '3.6' -#env: -# global: -# - DB=postgres -# matrix: -# - DJANGO=">=1.11,<2.0" -# - DJANGO=">=2.0,<2.1" -#addons: -# postgresql: '9.5' -#install: -# - pip install -q coverage coveralls flake8 Django$DJANGO django-nose>=1.4 -#before_script: -# - psql -c 'CREATE DATABASE querybuilder;' -U postgres -#script: -# - flake8 ./querybuilder -# - coverage run setup.py test -# - coverage report --fail-under=90 - language: python -#cache: pip + +sudo: false python: - "2.7" @@ -29,8 +8,6 @@ python: - "3.5" - "3.6" -#sudo: false - env: matrix: - DJANGO=1.10 @@ -44,7 +21,6 @@ addons: matrix: include: - { python: "3.6", env: TOXENV=flake8 } -# - { python: "3.6", env: TOXENV=docs } exclude: - { python: "2.7", env: DJANGO=master } diff --git a/requirements/docs.txt b/requirements/docs.txt index 7a6c865..830e0fb 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,3 +1,2 @@ Sphinx>=1.2.2 sphinx_rtd_theme -coveralls diff --git a/tox.ini b/tox.ini index 5a143e1..6e374c3 100644 --- a/tox.ini +++ b/tox.ini @@ -29,15 +29,3 @@ DJANGO = 1.11: django111 2.0: django20 master: djangomaster - -;[testenv:docs] -;basepython = python2.7 -;commands = mkdocs build -;deps = -; -rrequirements/requirements-testing.txt -; -rrequirements/requirements-documentation.txt -; -;[testenv:readme] -;commands = ./setup.py check -rs -;deps = -; -rrequirements/requirements-packaging.txt From 232c744c04893cf085eb3ebcfb6279dd853b7bc0 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Tue, 27 Mar 2018 12:16:55 -0400 Subject: [PATCH 28/29] bump version --- docs/release_notes.rst | 4 ++++ querybuilder/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index e7e76d2..27924d1 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -1,6 +1,10 @@ Release Notes ============= +v1.1.0 +------ +* Use tox to support more versions + v1.0.0 ------ * Drop Django 1.9 diff --git a/querybuilder/version.py b/querybuilder/version.py index 1f356cc..1a72d32 100644 --- a/querybuilder/version.py +++ b/querybuilder/version.py @@ -1 +1 @@ -__version__ = '1.0.0' +__version__ = '1.1.0' From 1214f2afc814ac331c3d876c4c7c3d6ac0ae9650 Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Tue, 27 Mar 2018 12:17:58 -0400 Subject: [PATCH 29/29] update setup file --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a76ef0e..3a95353 100644 --- a/setup.py +++ b/setup.py @@ -29,19 +29,22 @@ def get_version(): packages=find_packages(), classifiers=[ 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Framework :: Django', + 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', 'Framework :: Django :: 2.0', 'Development Status :: 5 - Production/Stable', ], license='MIT', install_requires=[ - 'Django>=1.11', + 'Django>=1.10', 'pytz>=2015.6', 'fleming>=0.4.4', 'six',