Merge lp:~cprov/core-image-publisher/flake8 into lp:core-image-publisher

Proposed by Celso Providelo
Status: Merged
Approved by: Thomi Richards
Approved revision: 20
Merged at revision: 20
Proposed branch: lp:~cprov/core-image-publisher/flake8
Merge into: lp:core-image-publisher
Diff against target: 79 lines (+19/-4)
5 files modified
README.rst (+5/-0)
called-by-tarmac.py (+5/-0)
core_image_publisher/constants.py (+3/-2)
setup.py (+4/-1)
test_requirements.txt (+2/-1)
To merge this branch: bzr merge lp:~cprov/core-image-publisher/flake8
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+254855@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.

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-30 20:42:11 +0000
3+++ README.rst 2015-04-01 01:34:02 +0000
4@@ -50,6 +50,11 @@
5
6 $ python setup.py test
7
8+Also with elegance in mind::
9+
10+ $ python setup.py flake8
11+
12+
13 The config file
14 ===============
15
16
17=== modified file 'called-by-tarmac.py'
18--- called-by-tarmac.py 2015-03-25 23:21:30 +0000
19+++ called-by-tarmac.py 2015-04-01 01:34:02 +0000
20@@ -89,6 +89,11 @@
21 'setup.py',
22 'test',
23 ],
24+ [
25+ os.path.join(ve_dir, 'bin', 'python3'),
26+ 'setup.py',
27+ 'flake8',
28+ ],
29 )
30 for cmd in all_cmds:
31 ret = _run_command(cmd)
32
33=== modified file 'core_image_publisher/constants.py'
34--- core_image_publisher/constants.py 2015-03-31 16:45:10 +0000
35+++ core_image_publisher/constants.py 2015-04-01 01:34:02 +0000
36@@ -25,6 +25,7 @@
37
38 SERVICE_NAME = "core-image-publisher"
39
40+
41 def _get_hostname():
42 """Return sanitized contents of /etc/hostname.
43
44@@ -32,8 +33,8 @@
45 are too big due to our long environment names ('<spec_name>-<MD5>').
46 Linux (DNS for RFC1035, really) only supports labels up to 64 chars and
47 the fallback varies from tool to tool, `cloud-init` chokes on longer
48- names and sets 'ubuntu', `hostnamectl` (systemd) would truncate the
49- given data.
50+ names and sets 'ubuntu' (which is the value considered by socket.get*),
51+ `hostnamectl` (systemd) would truncate the given data.
52
53 None of this is ideal to our applications, that's why we will operate
54 on the pristine /etc/hostname and remove the 'juju-' and '-machine' terms
55
56=== modified file 'setup.py'
57--- setup.py 2015-03-25 21:36:10 +0000
58+++ setup.py 2015-04-01 01:34:02 +0000
59@@ -20,7 +20,10 @@
60 import sys
61 assert sys.version_info >= (3,), 'Python 3 is required'
62
63-from setuptools import find_packages, setup, Extension
64+from setuptools import (
65+ find_packages,
66+ setup,
67+)
68
69
70 VERSION = '1.0.0'
71
72=== modified file 'test_requirements.txt'
73--- test_requirements.txt 2015-03-25 21:36:10 +0000
74+++ test_requirements.txt 2015-04-01 01:34:02 +0000
75@@ -1,1 +1,2 @@
76-testtools==1.7.1
77\ No newline at end of file
78+testtools==1.7.1
79+flake8==2.4.0

Subscribers

People subscribed via source and target branches