From b75425641393f873062ebf1c9158e6c1369ac3ad Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Tue, 26 Mar 2019 08:15:50 +0100 Subject: [PATCH 1/5] Enable check suite in favor of travis-ci QA runs --- .checks.yml | 2 ++ .travis.yml | 4 ---- setup.cfg | 4 ++++ tox.ini | 14 -------------- 4 files changed, 6 insertions(+), 18 deletions(-) create mode 100644 .checks.yml diff --git a/.checks.yml b/.checks.yml new file mode 100644 index 0000000..cd2d518 --- /dev/null +++ b/.checks.yml @@ -0,0 +1,2 @@ +- bandit +- flake8 diff --git a/.travis.yml b/.travis.yml index 9195e6e..9e07fe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ sudo: false cache: pip matrix: include: - - env: TOXENV=flake8-py27 - python: 2.7 - - env: TOXENV=flake8-py36 - python: 3.6 - env: TOXENV=readme-py27 python: 2.7 - env: TOXENV=py27-dj111-coverage diff --git a/setup.cfg b/setup.cfg index a8c18eb..28c24e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,3 +7,7 @@ branch = 1 parallel = 1 [coverage:report] include = configurations/*,tests/* + +[flake8] +exclude = .tox,docs/* +ignore = E501,E127,E128,E124,W503 diff --git a/tox.ini b/tox.ini index 0f8c5b3..24813fa 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,6 @@ usedevelop = true minversion = 1.8 whitelist_externals = sphinx-build envlist = - flake8-py27, - flake8-py36, readme-py27, py{27,34,35,36,py}-dj{18,110,111} py{34,35,36,37}-dj20 @@ -38,15 +36,3 @@ commands = [testenv:readme-py27] commands = python setup.py check -r -s deps = readme_renderer - -[testenv:flake8-py27] -commands = flake8 configurations tests -deps = flake8 - -[testenv:flake8-py36] -commands = flake8 configurations tests -deps = flake8 - -[flake8] -exclude = .tox -ignore = E501,E127,E128,E124,W503 From ec8a8e7df40c81f2db04a3f990eeaba5a124bd11 Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Tue, 26 Mar 2019 08:16:18 +0100 Subject: [PATCH 2/5] Fix bandit and flake8 errors --- .bandit | 2 ++ test_project/test_project/settings.py | 1 - test_project/test_project/urls.py | 2 +- test_project/test_project/wsgi.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .bandit diff --git a/.bandit b/.bandit new file mode 100644 index 0000000..fba0d25 --- /dev/null +++ b/.bandit @@ -0,0 +1,2 @@ +[bandit] +exclude: tests diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index 1ffe526..295981c 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -84,7 +84,6 @@ class Base(Configuration): STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) # Make this unique, and don't share it with anybody. diff --git a/test_project/test_project/urls.py b/test_project/test_project/urls.py index cc4356b..b23e2d5 100644 --- a/test_project/test_project/urls.py +++ b/test_project/test_project/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import patterns # Uncomment the next two lines to enable the admin: # from django.contrib import admin diff --git a/test_project/test_project/wsgi.py b/test_project/test_project/wsgi.py index b250403..1bdda28 100644 --- a/test_project/test_project/wsgi.py +++ b/test_project/test_project/wsgi.py @@ -20,7 +20,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION # setting points here. -from django.core.wsgi import get_wsgi_application +from django.core.wsgi import get_wsgi_application # noqa application = get_wsgi_application() # Apply WSGI middleware here. From 934ca958838ba227106ed32693d6202b112633ca Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Tue, 26 Mar 2019 11:36:41 +0100 Subject: [PATCH 3/5] Add checkqa test environment to tox Add support to run QA tests locally --- .bandit | 2 +- tox.ini | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.bandit b/.bandit index fba0d25..7db131d 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,2 @@ [bandit] -exclude: tests +exclude: tests,.tox diff --git a/tox.ini b/tox.ini index 24813fa..0b95c2d 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ usedevelop = true minversion = 1.8 whitelist_externals = sphinx-build envlist = + ckeckqa, readme-py27, py{27,34,35,36,py}-dj{18,110,111} py{34,35,36,37}-dj20 @@ -36,3 +37,11 @@ commands = [testenv:readme-py27] commands = python setup.py check -r -s deps = readme_renderer + +[testenv:checkqa] +commands = + flake8 {toxinidir} + bandit -r {toxinidir} +deps = + flake8 + bandit From bda8c22065ccd50ca4440ffd94e306d1689c64df Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Mon, 1 Apr 2019 14:44:43 +0200 Subject: [PATCH 4/5] Rename .checks.yml to .fussyfox.yml --- .checks.yml => .fussyfox.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .checks.yml => .fussyfox.yml (100%) diff --git a/.checks.yml b/.fussyfox.yml similarity index 100% rename from .checks.yml rename to .fussyfox.yml From 12036fabc82017855006dea94c1d65b83fb04650 Mon Sep 17 00:00:00 2001 From: Rustem Saiargaliev Date: Mon, 1 Apr 2019 15:27:44 +0200 Subject: [PATCH 5/5] Fix typo Co-Authored-By: codingjoe --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0b95c2d..233ad84 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ usedevelop = true minversion = 1.8 whitelist_externals = sphinx-build envlist = - ckeckqa, + checkqa, readme-py27, py{27,34,35,36,py}-dj{18,110,111} py{34,35,36,37}-dj20