From a13c7e6dd15d7bc47ca36f9f804fab7b3f78f5bf Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Thu, 11 Apr 2019 14:29:14 -0300 Subject: [PATCH] Adds pylint to tox test pipeline and fixes related errors Change-Id: Ie19400ce0cf591e0bfcbca690bd5d905ad9bd6f5 Signed-off-by: Benjamin Diaz --- setup.cfg | 47 +++++++++++++++++++++++++++++++++++++++++++++++ tox.ini | 8 +++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3182399 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Whitestack, LLC +# ************************************************************* + +# This file is part of OSM Monitoring module +# All Rights Reserved to Whitestack, LLC + +# 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. + +# For those usages not covered by the Apache License, Version 2.0 please +# contact: bdiaz@whitestack.com or glavado@whitestack.com +## + +[metadata] +name = POL +summary = Policy management module for OSM. +description-file = + README.rst +author = OSM +home-page = https://osm.etsi.org/ +classifier = + Environment :: OSM + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: ETSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + +[test] +test_suite=osm_policy_module.tests + +[files] +packages = + pbr diff --git a/tox.ini b/tox.ini index 584efa7..af61a35 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] -envlist = py3, flake8 +envlist = py3, flake8, pylint toxworkdir={homedir}/.tox [testenv] @@ -34,6 +34,12 @@ commands=python3 -m unittest discover -v install_command = python3 -m pip install -r requirements.txt -U {opts} {packages} deps = -r{toxinidir}/test-requirements.txt +[testenv:pylint] +basepython = python3 +deps = pylint +commands = + pylint -E osm_policy_module + [testenv:flake8] basepython = python3 deps = flake8 -- 2.25.1