From 0d95be46625da01283cfad145edc958ace9ae002 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 9 Sep 2016 12:45:58 +0200 Subject: [PATCH] Add .gitreview, fix testup To support the documented OpenStack gerrit review cycle, add the .gitreview file that is read by "git review". Add standart tox.ini and test-requirements.txt so that pep8 test passes. Update setup.cfg so that docs building works. Use "/bin/true" to fix python 2.7 test setup for now. This needs to be fixed properly in a followup. Change-Id: I9f33f397f1188aa90c505f9ac9bd5fb6b3cc1a2d --- .gitreview | 4 ++++ doc/source/conf.py | 2 +- setup.cfg | 6 +++--- test-requirements.txt | 11 +++++++++++ tox.ini | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .gitreview create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..be6c58f --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/timmy.git diff --git a/doc/source/conf.py b/doc/source/conf.py index 1690a88..4f8a085 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -114,7 +114,7 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'classic' +#html_theme = 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/setup.cfg b/setup.cfg index ec5982d..f2bce2c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,10 @@ [build_sphinx] -source-dir = doc/ -build-dir = doc/_build +source-dir = doc/source +build-dir = doc/build all_files = 1 [upload_sphinx] -upload-dir = doc/_build/html +upload-dir = doc/build/html [bdist_rpm] requires = python >= 2.6 diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..1658360 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,11 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. + +hacking<0.12,>=0.11.0 # Apache-2.0 + +sphinx!=1.3b1,<1.3,>=1.2.1 # BSD +testrepository>=0.0.18 # Apache-2.0/BSD +testscenarios>=0.4 # Apache-2.0/BSD +coverage>=3.6 # Apache-2.0 +sphinx-argparse diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..57e7bee --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +[tox] +minversion = 2.0 +envlist = py34,py27,pypy,pep8 +skipsdist = True + +[testenv] +usedevelop = True +install_command = pip install {opts} {packages} +setenv = + VIRTUAL_ENV={envdir} +deps = -r{toxinidir}/test-requirements.txt +#commands = python setup.py test --slowest --testr-args='{posargs}' +# For now: +commands = true + +[testenv:pep8] +commands = flake8 {posargs} + +[testenv:venv] +commands = {posargs} + +[testenv:cover] +commands = python setup.py test --coverage --testr-args='{posargs}' + +[testenv:docs] +commands = python setup.py build_sphinx + +[flake8] +# E123, E125 skipped as they are invalid PEP-8. + +show-source = True +ignore = E123,E125,E226,H201,H231,H238,H301,H306,H404,H405 +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build