Update from global requirements

Fix lots of pep8 issues caused by new version of hacking.

Change-Id: I70c1bef9e826a7c74ef87c052fc248e858ea0c73
This commit is contained in:
Ilya Shakhat 2014-12-22 18:49:58 +03:00
parent aa4413376f
commit 0d9f72e52f
13 changed files with 188 additions and 172 deletions

View File

@ -2,14 +2,14 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=0.6,!=0.7,<0.10.3
pbr>=0.6,!=0.7,<1.0
Babel>=1.3
Flask>=0.10,<1.0
iso8601>=0.1.9
oslo.config>=1.4.0 # Apache-2.0
oslo.i18n>=1.0.0 # Apache-2.0
oslo.serialization>=1.0.0 # Apache-2.0
oslo.utils>=1.0.0 # Apache-2.0
oslo.utils>=1.1.0 # Apache-2.0
paramiko>=1.13.0
psutil>=1.1.1,<2.0.0
PyGithub

View File

@ -9,7 +9,7 @@ iso8601>=0.1.9
oslo.config>=1.4.0 # Apache-2.0
oslo.i18n>=1.0.0 # Apache-2.0
oslo.serialization>=1.0.0 # Apache-2.0
oslo.utils>=1.0.0 # Apache-2.0
oslo.utils>=1.1.0 # Apache-2.0
paramiko>=1.13.0
psutil>=1.1.1,<2.0.0
PyGithub

View File

@ -237,9 +237,9 @@ def make_link(title, uri=None, options=None):
'metric')
param_values = {}
for param_name in param_names:
v = parameters.get_parameter({}, param_name)
if v:
param_values[param_name] = ','.join(v)
value = parameters.get_parameter({}, param_name)
if value:
param_values[param_name] = ','.join(value)
if options:
param_values.update(options)
if param_values:

View File

@ -274,7 +274,7 @@ def get_companies_json(record_ids, **kwargs):
memory_storage = vault.get_memory_storage()
companies = set(company
for company in memory_storage.get_index_keys_by_record_ids(
'company_name', record_ids))
'company_name', record_ids))
if kwargs['_params']['company']:
companies.add(memory_storage.get_original_company_name(

View File

@ -16,10 +16,10 @@
import collections
import hashlib
import json
import re
from github import MainClass
from oslo.config import cfg
import re
import six
from stackalytics.openstack.common import log as logging

View File

@ -14,11 +14,11 @@
# limitations under the License.
import pickle
import re
import sys
import memcache
from oslo.config import cfg
import re
import six
from six.moves.urllib import parse

View File

@ -25,10 +25,10 @@ from stackalytics.processor import utils
LOG = logging.getLogger(__name__)
NAME_AND_DATE_PATTERN = r'<h3>(?P<member_name>[^<]*)[\s\S]*?' \
r'<div class="span-7 last">(?P<date_joined>[^<]*)'
COMPANY_PATTERN = r'<strong>Date\sJoined[\s\S]*?<b>(?P<company_draft>[^<]*)' \
r'[\s\S]*?From\s(?P<date_from>[\s\S]*?)\(Current\)'
NAME_AND_DATE_PATTERN = (r'<h3>(?P<member_name>[^<]*)[\s\S]*?'
r'<div class="span-7 last">(?P<date_joined>[^<]*)')
COMPANY_PATTERN = (r'<strong>Date\sJoined[\s\S]*?<b>(?P<company_draft>[^<]*)'
r'[\s\S]*?From\s(?P<date_from>[\s\S]*?)\(Current\)')
GARBAGE_PATTERN = r'[/\\~%^\*_]+'

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8
hacking>=0.8.0,<0.9
hacking>=0.9.4,<0.10
coverage>=3.6
discover
fixtures>=0.3.14
@ -13,4 +13,4 @@ python-subunit
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
sphinxcontrib-httpdomain
testrepository>=0.0.17
testtools>=0.9.32
testtools>=0.9.32,<0.9.35

View File

@ -20,17 +20,18 @@ class TestAPICompanies(test_api.TestAPI):
def test_get_companies(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
{
'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'project_types': [
{'id': 'openstack', 'title': 'OpenStack',
'modules': ['nova', 'glance']}
],
'modules': ['nova', 'glance']}],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
@ -75,26 +76,28 @@ class TestAPICompanies(test_api.TestAPI):
def test_get_company(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
'module_groups': {
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance', 'nova-cli']},
{'id': 'openstack', 'title': 'OpenStack',
'modules': ['nova', 'glance']}]},
{
'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'module_groups': {
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance', 'nova-cli']},
{'id': 'openstack', 'title': 'OpenStack',
'modules': ['nova', 'glance']}]},
test_api.make_records(record_type=['commit'],
loc=[10, 20, 30],
module=['glance'],

View File

@ -20,29 +20,31 @@ class TestAPIModules(test_api.TestAPI):
def test_get_modules(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
'module_groups': {
'nova-group': {'id': 'nova-group',
'module_group_name': 'nova-group',
'modules': ['nova', 'nova-cli'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'nova-cli': test_api.make_module('nova-cli'),
'glance': test_api.make_module('glance'),
},
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance', 'nova-cli']},
{'id': 'integrated', 'title': 'Integrated',
'modules': ['nova', 'glance']}]},
{
'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'module_groups': {
'nova-group': {'id': 'nova-group',
'module_group_name': 'nova-group',
'modules': ['nova', 'nova-cli'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'nova-cli': test_api.make_module('nova-cli'),
'glance': test_api.make_module('glance'),
},
'releases': [
{'release_name': 'prehistory', 'end_date': 1234567890},
{'release_name': 'icehouse', 'end_date': 1234567890}],
'project_types': [{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance',
'nova-cli']},
{'id': 'integrated',
'title': 'Integrated',
'modules': ['nova', 'glance']}]},
test_api.make_records(record_type=['commit'],
module=['glance', 'nova', 'nova-cli'])):
@ -73,26 +75,27 @@ class TestAPIModules(test_api.TestAPI):
def test_get_module(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'}],
'module_groups': {
'nova-group': {'id': 'nova-group',
'module_group_name': 'nova-group',
'modules': ['nova-cli', 'nova'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'nova-cli': test_api.make_module('nova-cli'),
},
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance', 'nova-cli']},
{'id': 'openstack', 'title': 'OpenStack',
'modules': ['nova', 'glance']}]},
{
'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'}],
'module_groups': {
'nova-group': {'id': 'nova-group',
'module_group_name': 'nova-group',
'modules': ['nova-cli', 'nova'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'nova-cli': test_api.make_module('nova-cli'),
},
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance', 'nova-cli']},
{'id': 'openstack', 'title': 'OpenStack',
'modules': ['nova', 'glance']}]},
test_api.make_records(record_type=['commit'])):
response = self.app.get('/api/1.0/modules/nova')

View File

@ -20,26 +20,28 @@ class TestAPIStats(test_api.TestAPI):
def test_get_modules(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}]},
{
'repos': [
{'module': 'nova', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}]},
test_api.make_records(record_type=['commit'],
loc=[10, 20, 30],
module=['nova']),
@ -57,36 +59,39 @@ class TestAPIStats(test_api.TestAPI):
def test_get_engineers(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}],
'user:john_doe': {
'seq': 1, 'user_id': 'john_doe', 'user_name': 'John Doe',
'companies': [{'company_name': 'NEC', 'end_date': 0}],
'emails': ['john_doe@gmail.com'], 'core': []},
'user:bill': {
'seq': 1, 'user_id': 'bill', 'user_name': 'Bill Smith',
'companies': [{'company_name': 'IBM', 'end_date': 0}],
'emails': ['bill_smith@gmail.com'], 'core': []}},
{
'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}],
'user:john_doe': {
'seq': 1, 'user_id': 'john_doe',
'user_name': 'John Doe',
'companies': [{'company_name': 'NEC', 'end_date': 0}],
'emails': ['john_doe@gmail.com'], 'core': []},
'user:bill': {
'seq': 1, 'user_id': 'bill', 'user_name': 'Bill Smith',
'companies': [{'company_name': 'IBM', 'end_date': 0}],
'emails': ['bill_smith@gmail.com'], 'core': []}},
test_api.make_records(record_type=['commit'],
loc=[10, 20, 30],
module=['nova'],
@ -110,36 +115,40 @@ class TestAPIStats(test_api.TestAPI):
def test_get_engineers_extended(self):
with test_api.make_runtime_storage(
{'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}],
'user:john_doe': {
'seq': 1, 'user_id': 'john_doe', 'user_name': 'John Doe',
'companies': [{'company_name': 'NEC', 'end_date': 0}],
'emails': ['john_doe@gmail.com'], 'core': []},
'user:smith': {
'seq': 1, 'user_id': 'smith', 'user_name': 'Bill Smith',
'companies': [{'company_name': 'IBM', 'end_date': 0}],
'emails': ['bill_smith@gmail.com'], 'core': []}},
{
'repos': [
{'module': 'nova', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/nova.git'},
{'module': 'glance', 'project_type': 'openstack',
'organization': 'openstack',
'uri': 'git://git.openstack.org/openstack/glance.git'}
],
'releases': [{'release_name': 'prehistory',
'end_date': 1234567890},
{'release_name': 'icehouse',
'end_date': 1234567890}],
'module_groups': {
'openstack': {'id': 'openstack',
'module_group_name': 'openstack',
'modules': ['nova', 'glance'],
'tag': 'group'},
'nova': test_api.make_module('nova'),
'glance': test_api.make_module('glance'),
},
'project_types': [
{'id': 'all', 'title': 'All',
'modules': ['nova', 'glance']}],
'user:john_doe': {
'seq': 1, 'user_id': 'john_doe',
'user_name': 'John Doe',
'companies': [{'company_name': 'NEC', 'end_date': 0}],
'emails': ['john_doe@gmail.com'], 'core': []},
'user:smith': {
'seq': 1, 'user_id': 'smith',
'user_name': 'Bill Smith',
'companies': [{'company_name': 'IBM', 'end_date': 0}],
'emails': ['bill_smith@gmail.com'], 'core': []}},
test_api.make_records(record_type=['commit'],
loc=[10, 20, 30],
module=['nova'],

View File

@ -47,9 +47,10 @@ update the block_device_mapping with the potentially new connection_info \
returned.
Fixes bug <a href="https://bugs.launchpad.net/bugs/1076801" class="ext_link">\
1076801</a>
''' + ('Change-Id: <a href="https://review.openstack.org/#q,'
'Ie49ccd2138905e178843b375a9b16c3fe572d1db,n,z" class="ext_link">'
'Ie49ccd2138905e178843b375a9b16c3fe572d1db</a>')
''' + (
'Change-Id: <a href="https://review.openstack.org/#q,'
'Ie49ccd2138905e178843b375a9b16c3fe572d1db,n,z" class="ext_link">'
'Ie49ccd2138905e178843b375a9b16c3fe572d1db</a>')
observed = helpers.make_commit_message(record)

View File

@ -40,8 +40,8 @@ downloadcache = ~/cache/pip
commands = python setup.py build_sphinx
[flake8]
# E125 continuation line does not distinguish itself from next logical line
ignore = E125
# H904 Wrap long lines in parentheses instead of a backslash
ignore = H904
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build