diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..e43bff0 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=stackforge/python-monascaclient.git diff --git a/requirements.txt b/requirements.txt index 18d355a..9d3d114 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -pbr>=0.6,<1.0 argparse +babel iso8601>=0.1.8 +pbr>=0.6,<1.0 PrettyTable>=0.7,<0.8 python-keystoneclient>=0.6.0 PyYAML>=3.1.0 -six>=1.4.1 requests>=1.1 -babel +six>=1.4.1 diff --git a/setup.cfg b/setup.cfg index 1e566c3..c00135a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,9 @@ [metadata] -name = python-monclient -summary = Monitoring API Client Library +name = python-monascaclient +summary = Monasca API Client Library description-file = README.rst author = Hewlett-Packard -home-page = https://git.hpcloud.net/mon/python-monclient +home-page = https://github.com/stackforge/python-monascaclient classifier = Environment :: Console Intended Audience :: Information Technology @@ -29,10 +29,5 @@ console_scripts = [pbr] autodoc_index_modules = True -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - [wheel] universal = 1 diff --git a/setup.py b/setup.py index ea19b03..b0bea1e 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ -from setuptools import setup +import setuptools -setup( +setuptools.setup( setup_requires=['pbr'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 4f713bd..a4be43f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,12 +1,12 @@ # Hacking already pins down pep8, pyflakes and flake8 -tox>=1.6,<1.7 -hacking>=0.8.0,<0.9 +#tox>=1.6,<1.7 coverage>=3.6 discover fixtures>=0.3.14 +hacking>=0.8.0,<0.9 mock>=1.0 mox3>=0.7.0 sphinx>=1.1.2,<1.2 -testscenarios>=0.4 testrepository>=0.0.18 +testscenarios>=0.4 testtools>=0.9.34 diff --git a/tools/mon.bash_completion b/tools/mon.bash_completion index 9a9b62f..c1d59fa 100644 --- a/tools/mon.bash_completion +++ b/tools/mon.bash_completion @@ -24,4 +24,4 @@ _mon() fi return 0 } -complete -o default -o nospace -F _mon mon +complete -o default -F _mon mon diff --git a/tools/requirements_style_check.sh b/tools/requirements_style_check.sh new file mode 100755 index 0000000..ccbff3b --- /dev/null +++ b/tools/requirements_style_check.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Enforce the requirement that dependencies are listed in the input +# files in alphabetical order. + +# FIXME(dhellmann): This doesn't deal with URL requirements very +# well. We should probably sort those on the egg-name, rather than the +# full line. + +function check_file() { + typeset f=$1 + + # We don't care about comment lines. + grep -v '^#' $f > ${f}.unsorted + sort -i -f ${f}.unsorted > ${f}.sorted + diff -c ${f}.unsorted ${f}.sorted + rc=$? + rm -f ${f}.sorted ${f}.unsorted + return $rc +} + +exit_code=0 +for filename in $@ +do + check_file $filename + if [ $? -ne 0 ] + then + echo "Please list requirements in $filename in alphabetical order" 1>&2 + exit_code=1 + fi +done +exit $exit_code diff --git a/tox.ini b/tox.ini index ab805e4..ce31cb3 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 + {toxinidir}/tools/requirements_style_check.sh requirements.txt test-requirements.txt [testenv:venv] commands = {posargs} @@ -27,6 +28,6 @@ downloadcache = ~/cache/pip [flake8] show-source = True # H302: Do not import objects, only modules -ignore = H302 +ignore = H302,H803 builtins = _ -exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build +exclude=.venv,.git,.tox,dist,client_api_example.py,*openstack/common*,*lib/python*,*egg,build