Browse Source

Add tox.ini with pep8 environment that runs yamllint

Also fixes one lint failure - a trailing space in monitoring.yml.
Mark Goddard 11 months ago
parent
commit
f3aac5c4d0
7 changed files with 97 additions and 8 deletions
  1. 29
    7
      .gitignore
  2. 12
    0
      .yamllint
  3. 1
    1
      etc/kayobe/monitoring.yml
  4. 14
    0
      setup.cfg
  5. 22
    0
      setup.py
  6. 5
    0
      test-requirements.txt
  7. 14
    0
      tox.ini

+ 29
- 7
.gitignore View File

@@ -1,11 +1,33 @@
1
-# vim and emacs temp files
2
-*~
3
-[._]*.s[a-w][a-z]
4
-
5
-# Byte-compiled / optimized / DLL files
6
-__pycache__/
7 1
 *.py[cod]
8
-*$py.class
2
+
3
+# C extensions
4
+*.so
5
+
6
+# Packages
7
+*.egg*
8
+*.egg-info
9
+dist
10
+build
11
+eggs
12
+parts
13
+bin
14
+var
15
+sdist
16
+develop-eggs
17
+.installed.cfg
18
+lib
19
+lib64
20
+
21
+# Installer logs
22
+pip-log.txt
23
+
24
+# Unit test / coverage reports
25
+.tox
26
+
27
+# Editors
28
+*~
29
+.*.swp
30
+.*sw?
9 31
 
10 32
 # Files generated by Ansible
11 33
 ansible/*.retry

+ 12
- 0
.yamllint View File

@@ -0,0 +1,12 @@
1
+extends: default
2
+
3
+rules:
4
+  braces:
5
+    max-spaces-inside: 1
6
+    level: error
7
+  brackets:
8
+    max-spaces-inside: 1
9
+    level: error
10
+  comments:
11
+    require-starting-space: false
12
+  truthy: disable

+ 1
- 1
etc/kayobe/monitoring.yml View File

@@ -23,7 +23,7 @@
23 23
 
24 24
 # Dict of monitoring node BIOS options. Format is same as that used by
25 25
 # stackhpc.drac role.
26
-#monitoring_bios_config: 
26
+#monitoring_bios_config:
27 27
 
28 28
 # Dict of default monitoring node BIOS options. Format is same as that used by
29 29
 # stackhpc.drac role.

+ 14
- 0
setup.cfg View File

@@ -0,0 +1,14 @@
1
+[metadata]
2
+name = kayobe-config
3
+summary = Configuration for Kayobe
4
+description-file =
5
+    README.rst
6
+author = OpenStack
7
+author-email = openstack-dev@lists.openstack.org
8
+home-page = https://kayobe.readthedocs.io/en/latest/
9
+classifier =
10
+    Environment :: OpenStack
11
+    Intended Audience :: Information Technology
12
+    Intended Audience :: System Administrators
13
+    License :: OSI Approved :: Apache Software License
14
+    Operating System :: POSIX :: Linux

+ 22
- 0
setup.py View File

@@ -0,0 +1,22 @@
1
+#!/usr/bin/env python
2
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
3
+#
4
+# Licensed under the Apache License, Version 2.0 (the "License");
5
+# you may not use this file except in compliance with the License.
6
+# You may obtain a copy of the License at
7
+#
8
+#    http://www.apache.org/licenses/LICENSE-2.0
9
+#
10
+# Unless required by applicable law or agreed to in writing, software
11
+# distributed under the License is distributed on an "AS IS" BASIS,
12
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+# implied.
14
+# See the License for the specific language governing permissions and
15
+# limitations under the License.
16
+
17
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
18
+import setuptools
19
+
20
+setuptools.setup(
21
+    setup_requires=['pbr'],
22
+    pbr=True)

+ 5
- 0
test-requirements.txt View File

@@ -0,0 +1,5 @@
1
+# The order of packages is significant, because pip processes them in the order
2
+# of appearance. Changing the order has an impact on the overall integration
3
+# process, which may cause wedges in the gate later.
4
+
5
+yamllint # GPLv3

+ 14
- 0
tox.ini View File

@@ -0,0 +1,14 @@
1
+[tox]
2
+minversion = 2.0
3
+envlist = pep8
4
+skipsdist = True
5
+
6
+[testenv]
7
+install_command = pip install {opts} {packages}
8
+deps =
9
+    -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens}
10
+    -r{toxinidir}/test-requirements.txt
11
+
12
+[testenv:pep8]
13
+commands =
14
+  yamllint etc/kayobe

Loading…
Cancel
Save