From 65fa1f71e51ea1d510496155a6605638bd1986d9 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sun, 27 Sep 2020 18:49:46 +0200 Subject: [PATCH] Move flake8 plugins to development dependencies This makes it easier for developers to run flake8 in their development virtualenv. --- README.md | 2 +- setup.cfg | 8 +++++++- tests/modules/Jenkinsfile | 2 +- tox.ini | 9 +-------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3e1f047e9..b76319bd9 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ To upgrade such installations, just run: If you want to run dosage directly from the source code, you should install it in "[editable]" mode, preferable in a [virtual environment]: - pip install -e .[css,bash] + pip install -e .[css,bash,dev] You can invoke Dosage directly from the source code as `./dosage`, but this mode of operation is discouraged, since dependencies might be missing. diff --git a/setup.cfg b/setup.cfg index 8895c4c0e..b426dd9d1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,10 +52,16 @@ bash = argcomplete css = cssselect -test = +dev = pytest-cov pytest-xdist responses + flake8 + flake8-2020 + flake8-coding + flake8-future-import + flake8-pytest + flake8-pytest-style [bdist_wheel] universal = 1 diff --git a/tests/modules/Jenkinsfile b/tests/modules/Jenkinsfile index b015f0213..3ce4911d4 100644 --- a/tests/modules/Jenkinsfile +++ b/tests/modules/Jenkinsfile @@ -19,7 +19,7 @@ def runTests() { checkout scm } stage ('Install lib') { - sh "pip install --user -e .[css,test]" + sh "pip install --user -e .[css,dev]" } stage ('Run tests') { sh "TESTALL=1 py.test -v --cov=dosagelib --cov-report xml --tb=short -n10 --junitxml=junit.xml tests/modules/check_comics.py || true" diff --git a/tox.ini b/tox.ini index c444554e6..7119a02c4 100644 --- a/tox.ini +++ b/tox.ini @@ -20,19 +20,12 @@ deps = # Also install extra dependencies for tests. extras = css - test + dev [testenv:flake8] commands = - {envbindir}/flake8 --format=pylint \ --tee --output-file={toxworkdir}/flake8.log -deps = - flake8 - flake8-2020 - flake8-coding - flake8-future-import - flake8-pytest - flake8-pytest-style [flake8] # we aim for 79, but this suppresses warnings for now...