summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2018-05-15 09:58:22 +0100
committerMark Goddard <mark@stackhpc.com>2018-05-15 09:58:43 +0100
commitf3aac5c4d0aebad751ef9ab29a45ae89e76ce297 (patch)
tree06f0eb4482ed81d9320fa53fa6b359e140894289
parentc0dc6c3d09995dbf6b34f0fe9d69402fb3397108 (diff)
Add tox.ini with pep8 environment that runs yamllint
Also fixes one lint failure - a trailing space in monitoring.yml.
-rw-r--r--.gitignore36
-rw-r--r--.yamllint12
-rw-r--r--etc/kayobe/monitoring.yml2
-rw-r--r--setup.cfg14
-rw-r--r--setup.py22
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini14
7 files changed, 97 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index eb61b58..713cead 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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*.py[cod] 1*.py[cod]
8*$py.class 2
3# C extensions
4*.so
5
6# Packages
7*.egg*
8*.egg-info
9dist
10build
11eggs
12parts
13bin
14var
15sdist
16develop-eggs
17.installed.cfg
18lib
19lib64
20
21# Installer logs
22pip-log.txt
23
24# Unit test / coverage reports
25.tox
26
27# Editors
28*~
29.*.swp
30.*sw?
9 31
10# Files generated by Ansible 32# Files generated by Ansible
11ansible/*.retry 33ansible/*.retry
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 0000000..479488d
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,12 @@
1extends: default
2
3rules:
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
diff --git a/etc/kayobe/monitoring.yml b/etc/kayobe/monitoring.yml
index a5dabbf..0b64855 100644
--- a/etc/kayobe/monitoring.yml
+++ b/etc/kayobe/monitoring.yml
@@ -23,7 +23,7 @@
23 23
24# Dict of monitoring node BIOS options. Format is same as that used by 24# Dict of monitoring node BIOS options. Format is same as that used by
25# stackhpc.drac role. 25# stackhpc.drac role.
26#monitoring_bios_config: 26#monitoring_bios_config:
27 27
28# Dict of default monitoring node BIOS options. Format is same as that used by 28# Dict of default monitoring node BIOS options. Format is same as that used by
29# stackhpc.drac role. 29# stackhpc.drac role.
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..f2954bb
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,14 @@
1[metadata]
2name = kayobe-config
3summary = Configuration for Kayobe
4description-file =
5 README.rst
6author = OpenStack
7author-email = openstack-dev@lists.openstack.org
8home-page = https://kayobe.readthedocs.io/en/latest/
9classifier =
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
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..70c2b3f
--- /dev/null
+++ b/setup.py
@@ -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
18import setuptools
19
20setuptools.setup(
21 setup_requires=['pbr'],
22 pbr=True)
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..333d318
--- /dev/null
+++ b/test-requirements.txt
@@ -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
5yamllint # GPLv3
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c6a9b8c
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,14 @@
1[tox]
2minversion = 2.0
3envlist = pep8
4skipsdist = True
5
6[testenv]
7install_command = pip install {opts} {packages}
8deps =
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]
13commands =
14 yamllint etc/kayobe