Commit Graph

8 Commits

Author SHA1 Message Date
Sebastian Wagner
78f3473f55 qa,src: update mypy to 0.782
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-06-26 12:27:32 +02:00
Kefu Chai
c02748c8df qa: drop flake8-py2 test
as we've dropped py2 support, no need to run flake8 with python2
anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:00:56 +08:00
Sebastian Wagner
d6edd8199f qa/cephadm: Add local registry mirror
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-26 17:38:39 +02:00
Thomas Bechtold
cb8d906af5 qa: Add a tox env that can test importing files
While switching to python3, we need to make sure that we can import
the qa/tasks (and others, but this starts with qa/tasks) on a python3
environment.
To test this, we need to install teuthology into the test
venv. Currently, teuthology is not py3 ready so this will fail.

To test the current state of the qa/tasks directory with the ongoing
work for python3 within teuthology, you can now do:

TEUTHOLOGY_GIT=git+https://github.com/kshtsk/teuthology.git@wip-py3-compat \
    tox -eimport-tasks

This is using the current branch from
https://github.com/ceph/teuthology/pull/1362 which does the work to
make teuthology python3 ready.

NOTE: This tox env is not activated by default. It's currently failing
but it provides a way to iterate over the failures and once we have
them fixed, we can activate the tox env during make-check.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-26 16:16:31 +08:00
Sebastian Wagner
e34b60869d python: fixate mypy requirement to mypy==0.770
I don't like suprises when upstream publishes a new mypy version.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-03-12 16:27:45 +01:00
Thomas Bechtold
46e22c422b qa: Enable basic mypy support for qa/ directory
A first step to do more automatic code checks on the qa/
directory. This is useful while transitioning to python3.

Also use log_exc to top-level to not run into:

error: Argument 1 to "log_exc" has incompatible type
  "Callable[[OSDThrasher], Any]"; expected "OSDThrasher"

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-03-05 06:54:56 +01:00
Thomas Bechtold
bdcc94a1d1 qa: Run flake8 on python2 and python3
To be able to catch problems with python2 *and* python3, run flake8
with both versions. From the flake8 homepage:

It is very important to install Flake8 on the correct version of
Python for your needs. If you want Flake8 to properly parse new
language features in Python 3.5 (for example), you need it to be
installed on 3.5 for Flake8 to understand those features. In many
ways, Flake8 is tied to the version of Python on which it runs.

Also fix the problems with python3 on the way.
Note: This requires now the six module for teuthology. But this is
already an install_require in teuthology itself.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:20 +01:00
Sage Weil
c01f2ee0e2 move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00