Add tox.ini with pep8 environment that runs yamllint

Also fixes one lint failure - a trailing space in monitoring.yml.
This commit is contained in:
Mark Goddard 2018-05-15 09:58:22 +01:00
parent c0dc6c3d09
commit f3aac5c4d0
7 changed files with 97 additions and 8 deletions

36
.gitignore vendored
View File

@ -1,11 +1,33 @@
# vim and emacs temp files
*~
[._]*.s[a-w][a-z]
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod] *.py[cod]
*$py.class
# C extensions
*.so
# Packages
*.egg*
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports
.tox
# Editors
*~
.*.swp
.*sw?
# Files generated by Ansible # Files generated by Ansible
ansible/*.retry ansible/*.retry

12
.yamllint Normal file
View File

@ -0,0 +1,12 @@
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
comments:
require-starting-space: false
truthy: disable

14
setup.cfg Normal file
View File

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

22
setup.py Normal file
View File

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

5
test-requirements.txt Normal file
View File

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

14
tox.ini Normal file
View File

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