]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
node-proxy: add tox config for mypy, flake8, isort, black
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 3 Feb 2026 13:47:54 +0000 (14:47 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 18 Feb 2026 08:52:38 +0000 (09:52 +0100)
this adds tox.ini with environments to run mypy, flake8, isort, and
black on the ceph_node_proxy code.

Fixes: https://tracker.ceph.com/issues/74749
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-node-proxy/tox.ini [new file with mode: 0644]

diff --git a/src/ceph-node-proxy/tox.ini b/src/ceph-node-proxy/tox.ini
new file mode 100644 (file)
index 0000000..5e4acb6
--- /dev/null
@@ -0,0 +1,30 @@
+[tox]
+envlist = mypy,flake8,isort,black
+minversion = 3.0
+skipsdist = true
+
+[testenv]
+passenv = *
+setenv = PYTHONPATH = {toxinidir}
+
+[testenv:mypy]
+description = Run mypy type checker
+deps =
+    mypy >= 1.0
+    types-PyYAML
+commands = mypy ceph_node_proxy
+
+[testenv:flake8]
+description = Run flake8 linter
+deps = flake8 >= 6.0
+commands = flake8 --max-line-length=120 --extend-ignore=E203,W503 ceph_node_proxy
+
+[testenv:isort]
+description = Check import sorting with isort
+deps = isort >= 5.0
+commands = isort --profile black --check-only --diff ceph_node_proxy
+
+[testenv:black]
+description = Check code formatting with black
+deps = black >= 23.0
+commands = black --check ceph_node_proxy