From 639f653d71b53d325116c28bd4d9b0809b9e8854 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 3 Feb 2016 15:30:06 +0900 Subject: [PATCH] Enable pep8 tox env Fix a long line in doc/source/conf.py Add *.egg-info which is created when virtualenv is setup Change-Id: I3fb00e744b2d192870b5d1ea192a6091f7f0a7d8 --- .gitignore | 1 + doc/source/conf.py | 3 ++- test-requirements.txt | 2 ++ tox.ini | 12 ++++++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f0688e7..41b1b63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /doc/build/ +/openstacki18n.egg-info/ *.mo diff --git a/doc/source/conf.py b/doc/source/conf.py index 309a10d..f594b6a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -70,7 +70,8 @@ release = '1.0.0' # A few variables have to be set for the log-a-bug feature. # giturl: The location of conf.py on Git. Must be set manually. -# gitsha: The SHA checksum of the bug description. Automatically extracted from git log. +# gitsha: The SHA checksum of the bug description. +# Automatically extracted from git log. # bug_tag: Tag for categorizing the bug. Must be set manually. # These variables are passed to the logabug code via html_context. giturl = u'http://git.openstack.org/cgit/openstack/i18n/tree/doc/source' diff --git a/test-requirements.txt b/test-requirements.txt index 9aac156..f76ba7b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,5 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. +hacking>=0.10.2,<0.11 # Apache-2.0 + sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 81e2ded..130a24f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,10 @@ [tox] minversion = 1.6 -envlist = docs +envlist = docs,pep8 skipsdist = True [testenv] -basepython = python2 +usedevelop = True setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt @@ -12,4 +12,12 @@ deps = -r{toxinidir}/test-requirements.txt commands = {posargs} [testenv:docs] +basepython = python2 commands = sphinx-build -W -b html doc/source doc/build/html + +[testenv:pep8] +deps = + {[testenv]deps} +commands = + flake8 + # sh ./tools/coding-checks.sh --pylint '{posargs}'