From 14eca00f867cf7c9dcc763592549a14e3e85f3cb Mon Sep 17 00:00:00 2001 From: cahrens Date: Tue, 11 Jul 2017 11:33:51 -0400 Subject: [PATCH] Support django 1.11. EDUCATOR-771 --- .gitignore | 2 ++ .travis.yml | 12 ++++++++++-- AUTHORS | 1 + Makefile | 10 ++++------ organizations/__init__.py | 2 +- setup.py | 4 ++-- test-requirements.txt | 2 ++ tox.ini | 21 +++++++++++++++++++++ 8 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index e7315efc..0393aaf0 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,6 @@ reports/ coverage/ htmlcov/ acceptance_tests/*.png +.tox/ + diff --git a/.travis.yml b/.travis.yml index a80b89c8..9f7cb83f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,16 @@ language: python python: - - "2.7" + - 2.7 + +env: + - TOXENV=django18 + - TOXENV=django111 + +matrix: + include: + - python: 2.7 + env: TOXENV=quality before_install: - "export DISPLAY=:99.0" @@ -16,7 +25,6 @@ install: script: - make test - - make quality after_success: coveralls diff --git a/AUTHORS b/AUTHORS index d125ac82..7b83f7d3 100755 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,4 @@ Matt Drayer Zia Fazal Ahsan Ulhaq +Christina Roberts diff --git a/Makefile b/Makefile index 44fee20d..f2407d13 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,15 @@ +all: requirements quality test + clean: coverage erase find . -name '*.pyc' -delete quality: - pep8 --config=.pep8 organizations - pylint --rcfile=pylintrc organizations + tox -e quality requirements: pip install -e . # Install this package and its dependencies pip install -r test-requirements.txt test: - django-admin.py test organizations --settings=test_settings --with-coverage --cover-package=organizations - coverage report - -.PHONY: clean, quality, requirements, test + tox diff --git a/organizations/__init__.py b/organizations/__init__.py index e2e385fe..2412460d 100644 --- a/organizations/__init__.py +++ b/organizations/__init__.py @@ -1,4 +1,4 @@ """ edx-organizations app initialization module """ -__version__ = '0.4.4' # pragma: no cover +__version__ = '0.4.5' # pragma: no cover diff --git a/setup.py b/setup.py index b6be3304..05033c46 100755 --- a/setup.py +++ b/setup.py @@ -23,11 +23,11 @@ ], packages=find_packages(exclude=['tests']), install_requires=[ - 'django>=1.8,<1.9', + 'django>=1.8,<2.0', 'django-model-utils>=1.4.0', 'djangorestframework>=3.2.0,<3.4.0', 'djangorestframework-oauth>=1.1.0,<2.0.0', - 'edx-django-oauth2-provider>=0.5.0,<1.0.0', + 'edx-django-oauth2-provider>=1.2.0', 'edx-drf-extensions>=0.5.1,<1.0.0', 'edx-opaque-keys>=0.1.2,<1.0.0', 'Pillow', diff --git a/test-requirements.txt b/test-requirements.txt index 4ea996ba..cf85071e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,5 @@ factory-boy>=2.6.0,<3.0.0 httpretty>=0.8.14,<1.0.0 nose>=1.3.7,<2.0.0 pep8>=1.7.0,<2.0.0 +tox>=2.3.1,<3.0.0 + diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..326818cd --- /dev/null +++ b/tox.ini @@ -0,0 +1,21 @@ +[tox] +envlist = py27-django{18,111} + +[testenv] +setenv = + DJANGO_SETTINGS_MODULE = test_settings + PYTHONPATH = {toxinidir} + +deps = + django18: Django>=1.8,<1.9 + django111: Django>=1.11,<2.0 + -rtest-requirements.txt + +commands = + django-admin.py test organizations --with-coverage --cover-package=organizations + coverage report + +[testenv:quality] +commands = + pep8 --config=.pep8 organizations + pylint --rcfile=pylintrc organizations