From 7faa593329481d9a76a1bbcac78cfd41df7db78e Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 26 Apr 2018 05:38:25 -0600 Subject: [PATCH 1/2] Add flake8 to the testing --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d9edfe9c..9caf1923 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: # Useful for debugging any issues with conda - conda config --add channels pypi - conda info -a - - deps='pip numpy scipy cython nose pytorch' + - deps='pip numpy scipy cython nose pytorch flake8' - conda create -q -n test-environment "python=$TRAVIS_PYTHON_VERSION" $deps -c pytorch - source activate test-environment @@ -29,5 +29,11 @@ install: - pip install -e ".[test]" - python -c "import nltk; nltk.download('cmudict')" +before_script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + script: - nosetests -v -w tests/ -a '!local_only' From 61b9de50b545837a5ee7e8d48c5bca6f7953b7c9 Mon Sep 17 00:00:00 2001 From: cclauss Date: Fri, 27 Apr 2018 05:15:18 -0600 Subject: [PATCH 2/2] Rerun tests --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9caf1923..3fdea81d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,3 +37,4 @@ before_script: script: - nosetests -v -w tests/ -a '!local_only' +