Update app Zuul Check Jobs.
Modify code to conform to flake8 and pylint. Jobs are now flake8, pylint, py39 and metadata. Test Plan PASS - All zuul jobs pass as expected. Story: 2010929 Task: 49277 Change-Id: I8144587f90760dbd976ea70216aa8d952a0c4fba Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
This commit is contained in:
parent
2957dfdb0b
commit
abb61c361c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
.tox
|
.tox
|
||||||
.idea/
|
.idea/
|
||||||
|
venv/
|
91
.zuul.yaml
91
.zuul.yaml
@ -1,43 +1,30 @@
|
|||||||
---
|
---
|
||||||
- project:
|
- project:
|
||||||
|
vars:
|
||||||
|
ensure_tox_version: '<4'
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- k8sapp-openstack-tox-py36
|
|
||||||
- k8sapp-openstack-tox-py39
|
- k8sapp-openstack-tox-py39
|
||||||
- k8sapp-openstack-tox-pylint
|
- k8sapp-openstack-tox-pylint
|
||||||
|
- k8sapp-openstack-tox-flake8
|
||||||
|
- k8sapp-openstack-tox-metadata
|
||||||
- k8sapp-openstack-tox-pep8
|
- k8sapp-openstack-tox-pep8
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- k8sapp-openstack-tox-py36
|
|
||||||
- k8sapp-openstack-tox-py39
|
- k8sapp-openstack-tox-py39
|
||||||
- k8sapp-openstack-tox-pylint
|
- k8sapp-openstack-tox-pylint
|
||||||
|
- k8sapp-openstack-tox-flake8
|
||||||
|
- k8sapp-openstack-tox-metadata
|
||||||
- k8sapp-openstack-tox-pep8
|
- k8sapp-openstack-tox-pep8
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-openstack-armada-app-upload-git-mirror
|
- stx-openstack-armada-app-upload-git-mirror
|
||||||
|
|
||||||
- job:
|
|
||||||
name: k8sapp-openstack-tox-py36
|
|
||||||
parent: tox-py36
|
|
||||||
description: |
|
|
||||||
Run py36 test for k8app-openstack
|
|
||||||
nodeset: ubuntu-bionic
|
|
||||||
required-projects:
|
|
||||||
- starlingx/config
|
|
||||||
- starlingx/fault
|
|
||||||
- starlingx/update
|
|
||||||
- starlingx/utilities
|
|
||||||
files:
|
|
||||||
- python3-k8sapp-openstack/k8sapp_openstack/*
|
|
||||||
vars:
|
|
||||||
tox_envlist: py36
|
|
||||||
python_version: 3.6
|
|
||||||
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-openstack-tox-py39
|
name: k8sapp-openstack-tox-py39
|
||||||
parent: tox-py39
|
parent: openstack-tox-py39
|
||||||
description: |
|
description: |
|
||||||
Run py39 test for k8app-openstack
|
Run py39 test for k8app-openstack
|
||||||
nodeset: debian-bullseye
|
nodeset: debian-bullseye
|
||||||
@ -46,24 +33,34 @@
|
|||||||
- starlingx/fault
|
- starlingx/fault
|
||||||
- starlingx/update
|
- starlingx/update
|
||||||
- starlingx/utilities
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
files:
|
files:
|
||||||
- python3-k8sapp-openstack/k8sapp_openstack/*
|
- python3-k8sapp-openstack/k8sapp_openstack/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: py39
|
tox_envlist: py39
|
||||||
python_version: 3.9
|
python_version: 3.9
|
||||||
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: stx-openstack-armada-app-upload-git-mirror
|
name: k8sapp-openstack-tox-metadata
|
||||||
parent: upload-git-mirror
|
parent: tox
|
||||||
description: >
|
description: |
|
||||||
Mirrors opendev.org/starlingx/openstack-armada-app to
|
Run metadata tests for k8sapp_oidc
|
||||||
github.com/starlingx/openstack-armada-app
|
nodeset: debian-bullseye
|
||||||
|
required-projects:
|
||||||
|
- starlingx/config
|
||||||
|
- starlingx/fault
|
||||||
|
- starlingx/update
|
||||||
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
|
files:
|
||||||
|
- python3-k8sapp-openstack/*
|
||||||
vars:
|
vars:
|
||||||
git_mirror_repository: starlingx/openstack-armada-app
|
tox_envlist: metadata
|
||||||
secrets:
|
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
||||||
- name: git_mirror_credentials
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
secret: stx-openstack-armada-app-github-secret2
|
|
||||||
pass-to-parent: true
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-openstack-tox-pylint
|
name: k8sapp-openstack-tox-pylint
|
||||||
parent: tox
|
parent: tox
|
||||||
@ -75,11 +72,32 @@
|
|||||||
- starlingx/fault
|
- starlingx/fault
|
||||||
- starlingx/update
|
- starlingx/update
|
||||||
- starlingx/utilities
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
files:
|
files:
|
||||||
- python3-k8sapp-openstack/*
|
- python3-k8sapp-openstack/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: pylint
|
tox_envlist: pylint
|
||||||
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: k8sapp-openstack-tox-flake8
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run flake8 tests for k8sapp_oidc
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
required-projects:
|
||||||
|
- starlingx/config
|
||||||
|
- starlingx/fault
|
||||||
|
- starlingx/update
|
||||||
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
|
files:
|
||||||
|
- python3-k8sapp-openstack/*
|
||||||
|
vars:
|
||||||
|
tox_envlist: flake8
|
||||||
|
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-openstack-tox-pep8
|
name: k8sapp-openstack-tox-pep8
|
||||||
@ -98,6 +116,19 @@
|
|||||||
tox_envlist: pep8
|
tox_envlist: pep8
|
||||||
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
tox_extra_args: -c python3-k8sapp-openstack/k8sapp_openstack/tox.ini
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-openstack-armada-app-upload-git-mirror
|
||||||
|
parent: upload-git-mirror
|
||||||
|
description: >
|
||||||
|
Mirrors opendev.org/starlingx/openstack-armada-app to
|
||||||
|
github.com/starlingx/openstack-armada-app
|
||||||
|
vars:
|
||||||
|
git_mirror_repository: starlingx/openstack-armada-app
|
||||||
|
secrets:
|
||||||
|
- name: git_mirror_credentials
|
||||||
|
secret: stx-openstack-armada-app-github-secret2
|
||||||
|
pass-to-parent: true
|
||||||
|
|
||||||
- secret:
|
- secret:
|
||||||
name: stx-openstack-armada-app-github-secret2
|
name: stx-openstack-armada-app-github-secret2
|
||||||
data:
|
data:
|
||||||
|
@ -143,7 +143,9 @@ class OpenstackBaseHelm(FluxCDBaseHelm):
|
|||||||
if pw_format == common.PASSWORD_FORMAT_CEPH:
|
if pw_format == common.PASSWORD_FORMAT_CEPH:
|
||||||
try:
|
try:
|
||||||
cmd = ['ceph-authtool', '--gen-print-key']
|
cmd = ['ceph-authtool', '--gen-print-key']
|
||||||
password = subprocess.check_output(cmd).strip()
|
# pylint is showing a false positive for this subprocess line.
|
||||||
|
# supressing..
|
||||||
|
password = subprocess.check_output(cmd).strip() # pylint: disable=E1102
|
||||||
# TODO: Remove it when Debian is default for
|
# TODO: Remove it when Debian is default for
|
||||||
# at least two STX releases (prob. ~ stx/9.0)
|
# at least two STX releases (prob. ~ stx/9.0)
|
||||||
# Python Duck Typing to ensure compatibility with
|
# Python Duck Typing to ensure compatibility with
|
||||||
|
@ -7,7 +7,7 @@ rcfile=pylint.rc
|
|||||||
#init-hook=
|
#init-hook=
|
||||||
|
|
||||||
# Add files or directories to the blacklist. Should be base names, not paths.
|
# Add files or directories to the blacklist. Should be base names, not paths.
|
||||||
ignore=tests
|
ignore=
|
||||||
|
|
||||||
# Pickle collected data for later comparisons.
|
# Pickle collected data for later comparisons.
|
||||||
persistent=yes
|
persistent=yes
|
||||||
@ -31,166 +31,135 @@ extension-pkg-whitelist=lxml.etree,greenlet
|
|||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
|
||||||
# multiple time.
|
|
||||||
#
|
|
||||||
# Python3 checkers:
|
|
||||||
#
|
|
||||||
# E1601: print-statement
|
|
||||||
# E1602: parameter-unpacking
|
|
||||||
# E1603: unpacking-in-except
|
|
||||||
# E1604: old-raise-syntax
|
|
||||||
# E1605: backtick
|
|
||||||
# E1606: long-suffix
|
|
||||||
# E1607: old-ne-operator
|
|
||||||
# E1608: old-octal-literal
|
|
||||||
# E1609: import-star-module-level
|
|
||||||
# E1610: non-ascii-bytes-literal
|
|
||||||
# E1611: invalid-unicode-literal
|
|
||||||
# W1601: apply-builtin
|
|
||||||
# W1602: basestring-builtin
|
|
||||||
# W1603: buffer-builtin
|
|
||||||
# W1604: cmp-builtin
|
|
||||||
# W1605: coerce-builtin
|
|
||||||
# W1606: execfile-builtin
|
|
||||||
# W1607: file-builtin
|
|
||||||
# W1608: long-builtin
|
|
||||||
# W1609: raw_input-builtin
|
|
||||||
# W1610: reduce-builtin
|
|
||||||
# W1611: standarderror-builtin
|
|
||||||
# W1612: unicode-builtin
|
|
||||||
# W1613: xrange-builtin
|
|
||||||
# W1614: coerce-method
|
|
||||||
# W1615: delslice-method
|
|
||||||
# W1616: getslice-method
|
|
||||||
# W1617: setslice-method
|
|
||||||
# W1618: no-absolute-import
|
|
||||||
# W1619: old-division
|
|
||||||
# W1620: dict-iter-method
|
|
||||||
# W1621: dict-view-method
|
|
||||||
# W1622: next-method-called
|
|
||||||
# W1623: metaclass-assignment
|
|
||||||
# W1624: indexing-exception
|
|
||||||
# W1625: raising-string
|
|
||||||
# W1626: reload-builtin
|
|
||||||
# W1627: oct-method
|
|
||||||
# W1628: hex-method
|
|
||||||
# W1629: nonzero-method
|
|
||||||
# W1630: cmp-method
|
|
||||||
# W1632: input-builtin
|
|
||||||
# W1633: round-builtin
|
|
||||||
# W1634: intern-builtin
|
|
||||||
# W1635: unichr-builtin
|
|
||||||
# W1636: map-builtin-not-iterating
|
|
||||||
# W1637: zip-builtin-not-iterating
|
|
||||||
# W1638: range-builtin-not-iterating
|
|
||||||
# W1639: filter-builtin-not-iterating
|
|
||||||
# W1640: using-cmp-argument
|
|
||||||
# W1641: eq-without-hash
|
|
||||||
# W1642: div-method
|
|
||||||
# W1643: idiv-method
|
|
||||||
# W1644: rdiv-method
|
|
||||||
# W1645: exception-message-attribute
|
|
||||||
# W1646: invalid-str-codec
|
|
||||||
# W1647: sys-max-int
|
|
||||||
# W1648: bad-python3-import
|
|
||||||
# W1649: deprecated-string-function
|
|
||||||
# W1650: deprecated-str-translate-call
|
|
||||||
# W1651: deprecated-itertools-function
|
|
||||||
# W1652: deprecated-types-field
|
|
||||||
# W1653: next-method-defined
|
|
||||||
# W1654: dict-items-not-iterating
|
|
||||||
# W1655: dict-keys-not-iterating
|
|
||||||
# W1656: dict-values-not-iterating
|
|
||||||
# W1657: deprecated-operator-function
|
|
||||||
# W1658: deprecated-urllib-function
|
|
||||||
# W1659: xreadlines-attribute
|
|
||||||
# W1660: deprecated-sys-function
|
|
||||||
# W1661: exception-escape
|
|
||||||
# W1662: comprehension-escape
|
|
||||||
enable=E1603,E1609,E1610,E1602,E1606,E1608,E1607,E1605,E1604,E1601,E1611,W1652,
|
|
||||||
W1651,W1649,W1657,W1660,W1658,W1659,W1623,W1622,W1620,W1621,W1645,W1641,
|
|
||||||
W1624,W1648,W1625,W1611,W1662,W1661,W1650,W1640,W1630,W1614,W1615,W1642,
|
|
||||||
W1616,W1628,W1643,W1629,W1627,W1644,W1617,W1601,W1602,W1603,W1604,W1605,
|
|
||||||
W1654,W1655,W1656,W1619,W1606,W1607,W1639,W1618,W1632,W1634,W1608,W1636,
|
|
||||||
W1653,W1646,W1638,W1609,W1610,W1626,W1633,W1647,W1635,W1612,W1613,W1637
|
|
||||||
|
|
||||||
# Disable the message, report, category or checker with the given id(s). You
|
# Disable the message, report, category or checker with the given id(s). You
|
||||||
# can either give multiple identifier separated by comma (,) or put this option
|
# can either give multiple identifier separated by comma (,) or put this option
|
||||||
# multiple time (only on the command line, not in the configuration file where
|
# multiple time (only on the command line, not in the configuration file where
|
||||||
# it should appear only once).
|
# it should appear only once).
|
||||||
# See "Messages Control" section of
|
# See "Messages Control" section of
|
||||||
# https://pylint.readthedocs.io/en/latest/user_guide
|
# https://pylint.readthedocs.io/en/latest/user_guide
|
||||||
# We are disabling (C)onvention
|
disable=
|
||||||
# We are disabling (R)efactor
|
# C codes refer to Convention
|
||||||
# We are selectively disabling (W)arning
|
C0103, # invalid-name
|
||||||
# We are not disabling (F)atal, (E)rror
|
C0104, # disallowed-nameA
|
||||||
# The following warnings should be fixed:
|
C0112, # empty-docstring
|
||||||
# fixme (todo, xxx, fixme)
|
C0114, # missing-module-docstring
|
||||||
# W0101: unreachable
|
C0115, # missing-class-docstring
|
||||||
# W0105: pointless-string-statement
|
C0116, # missing-function-docstring
|
||||||
# W0106: expression-not-assigned
|
C0123, # unidiomatic-typecheck !!!
|
||||||
# W0107: unnecessary-pass
|
C0201, # consider-iterating-dictionary
|
||||||
# W0108: unnecessary-lambda
|
C0202, # bad-classmethod-argument
|
||||||
# W0110: deprecated-lambda
|
C0206, # consider-using-dict-items
|
||||||
# W0123: eval-used
|
C0207, # use-maxsplit-arg
|
||||||
# W0150: lost-exception
|
C0209, # consider-using-f-string
|
||||||
# W0201: attribute-defined-outside-init
|
C0301, # line-too-long
|
||||||
# W0211: bad-staticmethod-argument
|
C0302, # too-many-lines
|
||||||
# W0212: protected-access
|
C0325, # superfluous-parens
|
||||||
# W0221: arguments-differ
|
C0411, # wrong-import-order
|
||||||
# W0223: abstract-method
|
C0412, # ungrouped-imports
|
||||||
# W0231: super-init-not-called
|
C0413, # wrong-import-position
|
||||||
# W0235: useless-super-delegation
|
C0414, # useless-import-alias !!!
|
||||||
# W0311: bad-indentation
|
C0415, # import-outside-toplevel
|
||||||
# W0402: deprecated-module
|
C1802, # use-implicit-booleaness-not-len !!!
|
||||||
# W0403: relative-import
|
C2801, # unnecessary-dunder-call !!!
|
||||||
# W0404: reimported
|
C3002, # unnecessary-direct-lambda-call !!!
|
||||||
# W0603: global-statement
|
# R codes refer to refactoring
|
||||||
# W0612: unused-variable
|
R0022, # useless-option-value !!!
|
||||||
# W0613: unused-argument
|
R0205, # useless-object-inheritance
|
||||||
# W0621: redefined-outer-name
|
R0402, # consider-using-from-import
|
||||||
# W0622: redefined-builtin
|
R0901, # too-many-ancestors
|
||||||
# W0631: undefined-loop-variable
|
R0902, # too-many-instance-attributes
|
||||||
# W0632: unbalanced-tuple-unpacking
|
R0903, # too-few-public-methods
|
||||||
# W0701: bad-except-order
|
R0904, # too-many-public-methods
|
||||||
# W0703: broad-except
|
R0911, # too-many-return-statements
|
||||||
# W1113: keyword-arg-before-vararg
|
R0912, # too-many-branches
|
||||||
# W1201: logging-not-lazy
|
R0913, # too-many-arguments
|
||||||
# W1401: anomalous-backslash-in-string
|
R0914, # too-many-locals
|
||||||
# W1505: deprecated-method
|
R0915, # too-many-statements
|
||||||
# All these errors should be fixed:
|
R0916, # too-many-boolean-expressions
|
||||||
# E0213: no-self-argument
|
R1702, # too-many-nested-blocks
|
||||||
# E0401: import-error
|
R1703, # simplifiable-if-statement
|
||||||
# E0604: invalid-all-object
|
R1704, # redefined-argument-from-local !!!
|
||||||
# E0633: unpacking-non-sequence
|
R1705, # no-else-return
|
||||||
# E0701: bad-except-order
|
R1707, # trailing-comma-tuple !!!
|
||||||
# E1102: not-callable
|
R1708, # stop-iteration-return !!!
|
||||||
# E1120: no-value-for-parameter
|
R1710, # inconsistent-return-statements
|
||||||
# E1121: too-many-function-args
|
R1711, # useless-return
|
||||||
# Disable Python3 checkers:
|
R1714, # consider-using-in
|
||||||
# W1618: no-absolute-import
|
R1717, # consider-using-dict-comprehension !!!
|
||||||
# Adding some other checkers temporarily W0707, W1406, W1514
|
R1718, # consider-using-set-comprehension
|
||||||
disable=C, R, fixme, W0101, W0105, W0106, W0107, W0108, W0110, W0123, W0150,
|
R1719, # simplifiable-if-expression
|
||||||
W0201, W0211, W0212, W0221, W0223, W0231, W0235, W0311, W0402, W0403,
|
R1720, # no-else-raise
|
||||||
W0404, W0603, W0612, W0613, W0621, W0622, W0631, W0632, W0701, W0703,
|
R1721, # unnecessary-comprehension
|
||||||
W1113, W1201, W1401, W1505, W1618,
|
R1722, # consider-using-sys-exit !!!
|
||||||
E0213, E0401, E0604, E0633, E0701, E1102, E1120, E1121,
|
R1723, # no-else-break
|
||||||
W0707, W1406, W1514
|
R1724, # no-else-continue
|
||||||
|
R1725, # super-with-arguments
|
||||||
|
R1726, # simplifiable-condition !!!
|
||||||
|
R1728, # consider-using-generator
|
||||||
|
R1729, # use-a-generator
|
||||||
|
R1730, # consider-using-min-builtin !!!
|
||||||
|
R1731, # consider-using-max-builtin !!!
|
||||||
|
R1732, # consider-using-with
|
||||||
|
R1733, # unnecessary-dict-index-lookup !!
|
||||||
|
R1734, # use-list-literal
|
||||||
|
R1735, # use-dict-literal
|
||||||
|
# W codes are warnings
|
||||||
|
W0101, # unreachable
|
||||||
|
W0105, # pointless-string-statement
|
||||||
|
W0106, # expression-not-assigned
|
||||||
|
W0107, # unnecessary-pass
|
||||||
|
W0108, # unnecessary-lambda
|
||||||
|
W0109, # duplicate-key !!!
|
||||||
|
W0123, # eval-used
|
||||||
|
W0125, # using-constant-test !!!
|
||||||
|
W0133, # pointless-exception-statement !!!
|
||||||
|
W0143, # comparison-with-callable !!!
|
||||||
|
W0150, # lost-exception
|
||||||
|
W0201, # attribute-defined-outside-init
|
||||||
|
W0211, # bad-staticmethod-argument
|
||||||
|
W0212, # protected-access
|
||||||
|
W0221, # arguments-differ
|
||||||
|
W0223, # abstract-method
|
||||||
|
W0231, # super-init-not-called
|
||||||
|
W0235, # useless-super-delegation
|
||||||
|
W0237, # arguments-renamed !!!
|
||||||
|
W0311, # bad-indentation
|
||||||
|
W0402, # deprecated-module
|
||||||
|
W0404, # reimported
|
||||||
|
W0511, # fixme
|
||||||
|
W0602, # global-variable-not-assigned !!!
|
||||||
|
W0603, # global-statement
|
||||||
|
W0612, # unused-variable
|
||||||
|
W0613, # unused-argument
|
||||||
|
W0621, # redefined-outer-name
|
||||||
|
W0622, # redefined-builtin
|
||||||
|
W0631, # undefined-loop-variable
|
||||||
|
W0703, # broad-except (pylint 2.16 renamed to broad-except-caught)
|
||||||
|
W0706, # try-except-raise
|
||||||
|
W0707, # raise-missing-from
|
||||||
|
W0719, # broad-exception-raised
|
||||||
|
W1113, # keyword-arg-before-vararg
|
||||||
|
W1310, # format-string-without-interpolation !!!
|
||||||
|
W1401, # anomalous-backslash-in-string
|
||||||
|
W1406, # redundant-u-string-prefix
|
||||||
|
W1505, # deprecated-method
|
||||||
|
W1514, # unspecified-encoding
|
||||||
|
W3101, # missing-timeout
|
||||||
|
E0601, # used-before-assignment !!!
|
||||||
|
E0605, # invalid-all-format !!!
|
||||||
|
E1101, # no-member
|
||||||
|
E1111, # assignment-from-no-return
|
||||||
|
E1121, # too-many-function-args !!!
|
||||||
|
E1123, # unexpected-keyword-arg !!!
|
||||||
|
E1136, # unsubscriptable-object !!!
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
# Set the output format. Available formats are text, parseable, colorized, msvs
|
||||||
# (visual studio) and html
|
# (visual studio) and html
|
||||||
output-format=text
|
output-format=text
|
||||||
|
|
||||||
# Put messages in a separate file for each module / package specified on the
|
|
||||||
# command line instead of printing them on stdout. Reports (if any) will be
|
|
||||||
# written in a file name "pylint_global.[txt|html]".
|
|
||||||
files-output=no
|
|
||||||
|
|
||||||
# Tells whether to display a full report or only the messages
|
# Tells whether to display a full report or only the messages
|
||||||
reports=yes
|
reports=no
|
||||||
|
|
||||||
# Python expression which should return a note less than 10 (10 is the highest
|
# Python expression which should return a note less than 10 (10 is the highest
|
||||||
# note). You have access to the variables errors warning, statement which
|
# note). You have access to the variables errors warning, statement which
|
||||||
@ -247,9 +216,6 @@ generated-members=REQUEST,acl_users,aq_parent
|
|||||||
|
|
||||||
|
|
||||||
[BASIC]
|
[BASIC]
|
||||||
# List of builtins function names that should not be used, separated by a comma
|
|
||||||
bad-functions=map,filter,apply,input
|
|
||||||
|
|
||||||
# Regular expression which should only match correct module names
|
# Regular expression which should only match correct module names
|
||||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||||
|
|
||||||
@ -339,7 +305,7 @@ max-locals=15
|
|||||||
max-returns=6
|
max-returns=6
|
||||||
|
|
||||||
# Maximum number of branch for function / method body
|
# Maximum number of branch for function / method body
|
||||||
max-branchs=12
|
max-branches=12
|
||||||
|
|
||||||
# Maximum number of statements in function / method body
|
# Maximum number of statements in function / method body
|
||||||
max-statements=50
|
max-statements=50
|
||||||
@ -366,6 +332,5 @@ valid-classmethod-first-arg=cls
|
|||||||
|
|
||||||
|
|
||||||
[EXCEPTIONS]
|
[EXCEPTIONS]
|
||||||
# Exceptions that will emit a warning when being caught. Defaults to
|
# Exceptions that will emit a warning when caught.
|
||||||
# "Exception"
|
overgeneral-exceptions=builtins.BaseException,builtins.Exception
|
||||||
overgeneral-exceptions=Exception
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
pbr>=2.0.0
|
pbr>=2.0.0
|
||||||
PyYAML
|
PyYAML>=3.10.0
|
||||||
|
@ -1,23 +1,20 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# 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
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
pycodestyle<2.6.0 # MIT License
|
|
||||||
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
||||||
|
astroid
|
||||||
|
bandit<1.7.2;python_version>="3.0"
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
passlib>=1.7.0
|
python-subunit>=0.0.18
|
||||||
psycopg2-binary
|
|
||||||
python-barbicanclient>=4.5.2 # Apache-2.0
|
|
||||||
python-subunit>=1.4.0
|
|
||||||
requests-mock>=0.6.0 # Apache-2.0
|
requests-mock>=0.6.0 # Apache-2.0
|
||||||
|
sphinx
|
||||||
|
oslosphinx
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
stestr>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
testtools!=1.2.0,>=0.9.36
|
testtools!=1.2.0,>=0.9.36
|
||||||
pytest
|
isort<5;python_version>="3.0"
|
||||||
pyudev
|
pylint
|
||||||
migrate
|
pycryptodomex
|
||||||
python-ldap>=3.1.0
|
|
||||||
markupsafe
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,py27,py36,py39,pylint
|
envlist = pep8,py39,pylint,metadata,flake8
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
# skipsdist = True
|
# skipsdist = True
|
||||||
#,pip-missing-reqs
|
#,pip-missing-reqs
|
||||||
@ -11,16 +11,12 @@ distshare={toxworkdir}/.tox/distshare
|
|||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3.9
|
basepython = python3.9
|
||||||
# usedevelop = True
|
usedevelop = True
|
||||||
# enabling usedevelop results in py27 develop-inst:
|
|
||||||
# Exception: Versioning for this project requires either an sdist tarball,
|
|
||||||
# or access to an upstream git repository.
|
|
||||||
# Note. site-packages is false and rpm-python must be yum installed on your dev machine.
|
|
||||||
sitepackages = False
|
|
||||||
|
|
||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
find
|
find
|
||||||
|
echo
|
||||||
|
|
||||||
install_command = pip install -v -v -v \
|
install_command = pip install -v -v -v \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
@ -111,30 +107,6 @@ install_command = pip install -v -v -v \
|
|||||||
commands =
|
commands =
|
||||||
flake8 {posargs} .
|
flake8 {posargs} .
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
basepython = python2.7
|
|
||||||
install_command = pip install \
|
|
||||||
-v -v -v \
|
|
||||||
-c{toxinidir}/upper-constraints.txt \
|
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
|
||||||
{opts} {packages}
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr run {posargs}
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py36]
|
|
||||||
basepython = python3.6
|
|
||||||
install_command = pip install \
|
|
||||||
-v -v -v \
|
|
||||||
-c{toxinidir}/upper-constraints.txt \
|
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
|
||||||
{opts} {packages}
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr run {posargs}
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py39]
|
[testenv:py39]
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
@ -212,3 +184,11 @@ commands =
|
|||||||
deps = pip_missing_reqs
|
deps = pip_missing_reqs
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
commands=pip-missing-reqs -d --ignore-file=/k8sapp_openstack/tests k8sapp_openstack
|
commands=pip-missing-reqs -d --ignore-file=/k8sapp_openstack/tests k8sapp_openstack
|
||||||
|
|
||||||
|
[testenv:metadata]
|
||||||
|
install_command = pip install -v -v -v \
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
|
{opts} {packages}
|
||||||
|
# Pass top level app folder to 'sysinv-app tox' command.
|
||||||
|
commands =
|
||||||
|
bash -c "echo $(dirname $(dirname $(pwd))) | xargs -n 1 sysinv-app tox"
|
@ -1,3 +1,6 @@
|
|||||||
|
app_name: app-openstack
|
||||||
|
app_version: 1.0-1
|
||||||
|
|
||||||
disabled_charts:
|
disabled_charts:
|
||||||
- aodh
|
- aodh
|
||||||
- barbican
|
- barbican
|
||||||
|
8
tox.ini
8
tox.ini
@ -39,3 +39,11 @@ description = Dummy environment to allow pep8 to be run in subdir tox
|
|||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
description = Dummy environment to allow pylint to run in subdir tox
|
description = Dummy environment to allow pylint to run in subdir tox
|
||||||
|
|
||||||
|
[testenv:flake8]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow flake8 to be run in subdir tox
|
||||||
|
|
||||||
|
[testenv:metadata]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow sysinv-app to be run in subdir tox
|
||||||
|
Loading…
Reference in New Issue
Block a user