Fix CI for the project
Depends-On: https://review.opendev.org/c/openstack/horizon/+/936801 Change-Id: Ic97d90261f7634164fc9e2f90ed7851346532113
This commit is contained in:
parent
33db4d1d81
commit
5c90c800a6
67
.pylintrc
67
.pylintrc
@ -7,9 +7,6 @@
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Profiled execution.
|
||||
profile=no
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
@ -21,12 +18,6 @@ persistent=no
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# DEPRECATED
|
||||
include-ids=no
|
||||
|
||||
# DEPRECATED
|
||||
symbols=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
@ -55,11 +46,6 @@ disable=E1002,W,C,R,method-hidden,import-error,no-member
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
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
|
||||
reports=no
|
||||
|
||||
@ -70,10 +56,6 @@ reports=no
|
||||
# (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Add a comment according to your evaluation note. This is used by the global
|
||||
# evaluation report (RP0004).
|
||||
comment=no
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details
|
||||
#msg-template=
|
||||
@ -109,10 +91,6 @@ ignored-modules=distutils
|
||||
# (useful for classes with attributes dynamically set).
|
||||
ignored-classes=SQLObject
|
||||
|
||||
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
||||
# to generated-members.
|
||||
zope=no
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E0201 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
@ -127,12 +105,6 @@ notes=FIXME,XXX,TODO
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Required attributes for module, separated by a comma
|
||||
required-attributes=
|
||||
|
||||
# List of builtins function names that should not be used, separated by a comma
|
||||
bad-functions=map,filter,apply,input,file
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma
|
||||
good-names=i,j,k,ex,Run,_
|
||||
|
||||
@ -149,63 +121,33 @@ include-naming-hint=no
|
||||
# Regular expression matching correct function names
|
||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for function names
|
||||
function-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct variable names
|
||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for variable names
|
||||
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct constant names
|
||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
||||
|
||||
# Naming hint for constant names
|
||||
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
||||
|
||||
# Regular expression matching correct attribute names
|
||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for attribute names
|
||||
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct argument names
|
||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for argument names
|
||||
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression matching correct class attribute names
|
||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
||||
|
||||
# Naming hint for class attribute names
|
||||
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
||||
|
||||
# Regular expression matching correct inline iteration names
|
||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
||||
|
||||
# Naming hint for inline iteration names
|
||||
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
|
||||
|
||||
# Regular expression matching correct class names
|
||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
||||
|
||||
# Naming hint for class names
|
||||
class-name-hint=[A-Z_][a-zA-Z0-9]+$
|
||||
|
||||
# Regular expression matching correct module names
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||
|
||||
# Naming hint for module names
|
||||
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||
|
||||
# Regular expression matching correct method names
|
||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Naming hint for method names
|
||||
method-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=__.*__
|
||||
@ -248,9 +190,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
# List of optional constructs for which whitespace checking is disabled
|
||||
no-space-check=trailing-comma,dict-separator
|
||||
|
||||
# Maximum number of lines in a module
|
||||
max-module-lines=1000
|
||||
|
||||
@ -295,10 +234,6 @@ max-public-methods=20
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of interface methods to ignore, separated by a comma. This is used for
|
||||
# instance to not check methods defines in Zope's Interface base class.
|
||||
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,__new__,setUp
|
||||
|
||||
@ -331,4 +266,4 @@ int-import-graph=
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "Exception"
|
||||
overgeneral-exceptions=Exception
|
||||
overgeneral-exceptions=builtins.Exception
|
||||
|
@ -2,7 +2,8 @@
|
||||
templates:
|
||||
- check-requirements
|
||||
- horizon-non-primary-django-jobs
|
||||
- openstack-python3-zed-jobs
|
||||
- openstack-python3-jobs
|
||||
- publish-openstack-docs-pti
|
||||
|
||||
check:
|
||||
jobs:
|
||||
|
11
bindep.txt
11
bindep.txt
@ -1,13 +1,10 @@
|
||||
# A build time dependency
|
||||
# these are needed to compile Python dependencies from sources
|
||||
python-dev [platform:dpkg test]
|
||||
python3-all-dev [platform:dpkg !platform:ubuntu-precise test]
|
||||
python-devel [platform:rpm test]
|
||||
python3-devel [platform:rpm test]
|
||||
build-essential [platform:dpkg test]
|
||||
# these are needed by infra for python-* jobs
|
||||
libmariadb-dev-compat [platform:dpkg test]
|
||||
mariadb [platform:rpm test]
|
||||
mariadb-server [platform:rpm test]
|
||||
mysql-client [platform:dpkg test]
|
||||
mysql-server [platform:dpkg test]
|
||||
|
||||
mariadb-client [platform:dpkg test]
|
||||
mariadb-devel [platform:rpm test]
|
||||
mariadb-server [test]
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
|
||||
from horizon import tables
|
||||
from django.urls import reverse
|
||||
@ -25,7 +25,7 @@ class DeleteAction(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Action",
|
||||
u"Delete Actions",
|
||||
count
|
||||
@ -33,7 +33,7 @@ class DeleteAction(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Action",
|
||||
u"Deleted Actions",
|
||||
count
|
||||
|
@ -13,7 +13,7 @@
|
||||
import pprint
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views import generic
|
||||
|
||||
from horizon import tables
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
from django.urls import reverse
|
||||
from django.utils import safestring
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import tables
|
||||
from horizon.utils import functions as utils
|
||||
@ -41,7 +41,7 @@ class DeleteBackup(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Backup",
|
||||
u"Delete Backups",
|
||||
count
|
||||
@ -49,7 +49,7 @@ class DeleteBackup(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Backup",
|
||||
u"Deleted Backups",
|
||||
count
|
||||
|
@ -13,7 +13,7 @@
|
||||
import datetime
|
||||
import pprint
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views import generic
|
||||
|
||||
from horizon import tables
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django.core import exceptions as d_exceptions
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
|
||||
from horizon import tables
|
||||
from django.urls import reverse
|
||||
@ -30,7 +30,7 @@ class DeleteClient(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Client",
|
||||
u"Delete Clients",
|
||||
count
|
||||
@ -38,7 +38,7 @@ class DeleteClient(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Client",
|
||||
u"Deleted Clients",
|
||||
count
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
import pprint
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views import generic
|
||||
|
||||
from horizon import tables
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from disaster_recovery.jobs import tables
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
|
||||
from horizon import tables
|
||||
from horizon import messages
|
||||
@ -48,7 +48,7 @@ class DeleteJob(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Job File",
|
||||
u"Delete Job Files",
|
||||
count
|
||||
@ -56,7 +56,7 @@ class DeleteJob(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Job File",
|
||||
u"Deleted Job Files",
|
||||
count
|
||||
@ -194,7 +194,7 @@ class DeleteAction(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Action",
|
||||
u"Delete Action",
|
||||
count
|
||||
@ -202,7 +202,7 @@ class DeleteAction(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted action File",
|
||||
u"Deleted action Files",
|
||||
count
|
||||
|
@ -11,7 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -15,7 +15,7 @@
|
||||
import datetime
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -15,7 +15,7 @@
|
||||
import datetime
|
||||
|
||||
from django import shortcuts
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from disaster_recovery.sessions import tables
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
@ -12,8 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import ngettext_lazy
|
||||
from django.urls import reverse
|
||||
|
||||
from horizon import tables
|
||||
@ -45,7 +45,7 @@ class DeleteSession(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Session",
|
||||
u"Delete Sessions",
|
||||
count
|
||||
@ -53,7 +53,7 @@ class DeleteSession(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Session",
|
||||
u"Deleted Sessions",
|
||||
count
|
||||
@ -85,7 +85,7 @@ class DeleteJobFromSession(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_present(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Delete Job",
|
||||
u"Delete Jobs",
|
||||
count
|
||||
@ -93,7 +93,7 @@ class DeleteJobFromSession(tables.DeleteAction):
|
||||
|
||||
@staticmethod
|
||||
def action_past(count):
|
||||
return ungettext_lazy(
|
||||
return ngettext_lazy(
|
||||
u"Deleted Job",
|
||||
u"Deleted Jobs",
|
||||
count
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse
|
||||
|
||||
from horizon import exceptions
|
||||
|
@ -15,7 +15,7 @@
|
||||
import datetime
|
||||
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
from horizon import exceptions
|
||||
|
@ -19,7 +19,7 @@ from functools import wraps
|
||||
|
||||
from django.urls import reverse
|
||||
from django.template.defaultfilters import date as django_date
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import get_user_home
|
||||
|
@ -124,7 +124,7 @@ html_theme = 'default'
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
|
13
tox.ini
13
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py38,py39,pep8,pylint,docs
|
||||
envlist = py39,py311,py312,pep8,pylint,docs
|
||||
minversion = 2.0
|
||||
skipsdist = True
|
||||
|
||||
@ -18,12 +18,15 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/up
|
||||
commands =
|
||||
python manage.py test {posargs}
|
||||
|
||||
[testenv:py38]
|
||||
basepython = python3.8
|
||||
|
||||
[testenv:py39]
|
||||
basepython = python3.9
|
||||
|
||||
[testenv:py311]
|
||||
basepython = python3.11
|
||||
|
||||
[testenv:py312]
|
||||
basepython = python3.12
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 {posargs}
|
||||
|
||||
@ -36,7 +39,7 @@ commands = python setup.py test --coverage --testr-args={posargs}
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings
|
||||
commands = python setup.py build_sphinx
|
||||
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pylint]
|
||||
commands = pylint --rcfile .pylintrc disaster_recovery
|
||||
|
Loading…
x
Reference in New Issue
Block a user