Merge lp:~cprov/core-result-checker/flake8 into lp:core-result-checker

Proposed by Celso Providelo
Status: Merged
Approved by: Thomi Richards
Approved revision: 7
Merged at revision: 6
Proposed branch: lp:~cprov/core-result-checker/flake8
Merge into: lp:core-result-checker
Diff against target: 138 lines (+86/-2)
6 files modified
README.rst (+72/-1)
called-by-tarmac.py (+5/-0)
core_result_checker/__init__.py (+1/-0)
requirements.txt (+2/-0)
setup.py (+4/-1)
test_requirements.txt (+2/-0)
To merge this branch: bzr merge lp:~cprov/core-result-checker/flake8
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+254856@code.launchpad.net

Commit message

Installing flake8 for tests and benefiting of its integration with setuptools for processing all installed files.

Description of the change

Installing flake8 for tests and benefiting of its integration with setuptools for processing all installed files.

Also fixing current issues and requiring flake8 clearness in tarmac, plus extra heavy-lifting on boilerplate files (README and requirements.txt)

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.rst'
2--- README.rst 2015-03-24 22:57:22 +0000
3+++ README.rst 2015-04-01 01:35:59 +0000
4@@ -1,4 +1,75 @@
5 Core Result Checker
6 ###################
7
8-A micro-service that checks results from the core-image-tester and makes them public.
9+A micro-service that checks results from the core-image-tester and makes
10+them public.
11+
12+
13+Get the Source
14+==============
15+
16+Branch the code::
17+
18+ $ bzr branch lp:core-result-checker
19+
20+
21+Install the Service
22+===================
23+
24+Build and activate a virtualenv with python3::
25+
26+ $ virtualenv -p python3 --system-site-packages ve
27+ $ . ve/bin/activate
28+
29+Install dependencies from pypi::
30+
31+ $ pip install -r requirements.txt
32+
33+Install the service itself::
34+
35+ $ python setup.py install
36+
37+...you may want to install it in 'development mode', which symlinks files,
38+so you can edit/re-run without having to re-install the service. In that
39+case, run::
40+
41+ $ python setup.py develop
42+
43+
44+Run the tests!
45+==============
46+
47+Install dependencies::
48+
49+ $ pip install -r test_requirements.txt
50+
51+Run those tests - with vigour!::
52+
53+ $ python setup.py test
54+
55+Also with elegance in mind::
56+
57+ $ python setup.py flake8
58+
59+
60+The config file
61+===============
62+
63+The sample configuration file in 'core-service.conf'::
64+
65+ [amqp]
66+ uris = amqp://guest:guest@localhost:5672//
67+
68+ [nova]
69+ os_username = foo
70+ os_password = <redacted>
71+ os_tenant_name = foo_project
72+ os_auth_url = http://172.20.161.138:5000/v2.0/
73+
74+...optionally, add a logstash section, which will turn on the logstash
75+handler::
76+
77+ [logstash]
78+ host = 127.0.0.1
79+ port = 1234
80+ version = 1
81
82=== modified file 'called-by-tarmac.py'
83--- called-by-tarmac.py 2015-03-27 04:37:20 +0000
84+++ called-by-tarmac.py 2015-04-01 01:35:59 +0000
85@@ -89,6 +89,11 @@
86 'setup.py',
87 'test',
88 ],
89+ [
90+ os.path.join(ve_dir, 'bin', 'python3'),
91+ 'setup.py',
92+ 'flake8',
93+ ],
94 )
95 for cmd in all_cmds:
96 ret = _run_command(cmd)
97
98=== modified file 'core_result_checker/__init__.py'
99--- core_result_checker/__init__.py 2015-03-27 04:35:19 +0000
100+++ core_result_checker/__init__.py 2015-04-01 01:35:59 +0000
101@@ -19,6 +19,7 @@
102 import configparser
103 import logging
104 import logging.handlers
105+import logstash
106 import os
107 import select
108
109
110=== modified file 'requirements.txt'
111--- requirements.txt 2015-03-25 02:54:49 +0000
112+++ requirements.txt 2015-04-01 01:35:59 +0000
113@@ -0,0 +1,2 @@
114+kombu==3.0.24
115+python-logstash==0.4.2
116
117=== modified file 'setup.py'
118--- setup.py 2015-03-25 04:59:12 +0000
119+++ setup.py 2015-04-01 01:35:59 +0000
120@@ -20,7 +20,10 @@
121 import sys
122 assert sys.version_info >= (3,), 'Python 3 is required'
123
124-from setuptools import find_packages, setup, Extension
125+from setuptools import (
126+ find_packages,
127+ setup,
128+)
129
130
131 VERSION = '1.0.0'
132
133=== modified file 'test_requirements.txt'
134--- test_requirements.txt 2015-03-25 02:54:49 +0000
135+++ test_requirements.txt 2015-04-01 01:35:59 +0000
136@@ -0,0 +1,2 @@
137+testtools==1.7.1
138+flake8==2.4.0

Subscribers

People subscribed via source and target branches