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 ede106a..88bf443 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,47 @@ -sudo: true language: python + +sudo: false + python: - - '3.5' - - '3.6' + - "2.7" + - "3.4" + - "3.5" + - "3.6" + env: - global: - - DB=postgres matrix: - - DJANGO=">=1.11,<2.0" - - DJANGO=">=2.0,<2.1" + - DJANGO=1.10 + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master + addons: postgresql: '9.5' + +matrix: + include: + - { python: "3.6", env: TOXENV=flake8 } + + 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 } + + allow_failures: + - env: DJANGO=master + install: - - pip install -q coverage coveralls flake8 Django$DJANGO django-nose>=1.4 + - pip install tox-travis + before_script: - psql -c 'CREATE DATABASE querybuilder;' -U postgres + script: - - flake8 ./querybuilder - - coverage run setup.py test - - coverage report --fail-under=90 + - tox + 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/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' diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt new file mode 100644 index 0000000..6a11970 --- /dev/null +++ b/requirements/requirements-testing.txt @@ -0,0 +1,10 @@ +pytz +fleming +six +psycopg2 +django-nose>=1.4 +django-dynamic-fixture +jsonfield==0.9.20 +mock +coverage +coveralls 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', diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..6e374c3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,31 @@ +[tox] +envlist = + flake8 + py{27,34,35}-django110 + py{27,34,35,36}-django111 + py{34,35,36}-django20 + py{35,36}-djangomaster + +[testenv] +setenv = + DB = postgres +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 + +[testenv:flake8] +deps = flake8 +commands = flake8 querybuilder + +[travis:env] +DJANGO = + 1.10: django110 + 1.11: django111 + 2.0: django20 + master: djangomaster