From 38c559e10b824c04278eb786e2c7aac51563896a Mon Sep 17 00:00:00 2001 From: Anne Fleischer Date: Mon, 12 Nov 2018 11:09:07 +0100 Subject: [PATCH] cleanup dev and test configuration (#133) --- .gitignore | 4 +++- .travis.yml | 6 +++--- requirements-dev.txt | 8 -------- requirements.txt | 1 - setup.cfg | 13 ++++++++++--- setup.py | 3 ++- 6 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 requirements-dev.txt diff --git a/.gitignore b/.gitignore index d9a3fb2..f6c99fb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.so # Packages -*.egg +*.eggs *.egg-info dist build @@ -44,3 +44,5 @@ docs/_build .cache .pytest_cache + +.env diff --git a/.travis.yml b/.travis.yml index 4a8837a..2922bdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,18 +9,18 @@ env: - secure: eO08tZokK+Etpp4ISvxVaWHe5tN6PC/SzLHcltqgvqRYa7L9zY5NKQjiY5LvUw1onnbbSPMnTabFWrcw3VtoQ1he5M2NbqqTSLTxT9dSWXhy6KRymNXVkEv4Ar6WWiQDUPlyMY7XTG35G5jo6C3LBer5FRKDpEAPlw51z4TyML0= matrix: - DJANGO="https://github.com/django/django/archive/stable/2.0.x.tar.gz#egg=django" + - DJANGO="https://github.com/django/django/archive/stable/2.1.x.tar.gz#egg=django" - DJANGO="https://github.com/django/django/archive/stable/1.11.x.tar.gz#egg=django" - DJANGO="https://github.com/django/django/archive/master.tar.gz#egg=django" matrix: allow_failures: - env: DJANGO="https://github.com/django/django/archive/master.tar.gz#egg=django" install: -- pip install -U codecov -- pip install -r requirements-dev.txt +- pip install -U codecov isort - pip install $DJANGO script: +- coverage run --source=closeio setup.py test - isort --check-only --recursive --diff . -- coverage run --source=closeio -m 'pytest' after_success: - codecov deploy: diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index f1582e8..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,8 +0,0 @@ --e . -coverage>=4.5.1 -django==2.0.9 -flake8==3.6.0 -isort>=4.3.4 -pytest>=3.6.2 -pytest-django>=3.3.2 -pytest-rerunfailures>=4.1 diff --git a/requirements.txt b/requirements.txt index 60c68d6..66fd821 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,3 @@ python-dateutil>=2.2 requests>=2.2.1 six>=1.6.1 slumber==0.7.1 -wheel>=0.22.0 diff --git a/setup.cfg b/setup.cfg index 426d41f..0a8e56c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ pytest11 = closeio = closeio.contrib.pytest_plugin [tool:pytest] -norecursedirs=env .git venv +norecursedirs=env .git venv .eggs addopts = --tb=short -rxs pep8maxlinelength=99 pep8ignore= @@ -32,6 +32,13 @@ pep8ignore= flakes-ignore= runtests.py ALL +[extras] +django = + django>=1.11 + +[aliases] +test = pytest + [pycodestyle] max-line-length = 99 statistics = true @@ -58,5 +65,5 @@ multi_line_output = 5 line_length = 79 combine_as_imports = true known_first_party = closeio,tests -known_third_party = django -skip = wsgi.py,docs,env +known_third_party = dateutil,django,pytest,six,slumber +skip = wsgi.py,docs,env,.eggs diff --git a/setup.py b/setup.py index aa2d8a0..1d4ace7 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from setuptools import setup setup( - setup_requires=['pbr'], + setup_requires=['pbr', 'pytest-runner'], + tests_require=['django>=1.11', 'pytest', 'pytest-django', 'pytest-rerunfailures'], pbr=True, )