8 openapi
-{check
, fix
, doc
}
14 --cov --cov-append --cov-report=term
16 --ignore=frontend/ --ignore=module.py
26 -rrequirements
-test.txt
30 -rrequirements
-lint.txt
36 -rrequirements
-extra.txt
40 PYTHONPATH=$PYTHONPATH:../..
41 CFLAGS = -DXMLSEC_NO_SIZE_T
43 PYTHONDONTWRITEBYTECODE=1
45 WEBTEST_INTERACTIVE = false
55 allowlist_externals = *
60 ignore = E226 E402 W503 F812
74 #TODO: Uncomment and refactor (https://tracker.ceph.com/issues/41221)
76 format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
85 # Allow similarity/code duplication detection
87 dirs = . api controllers plugins services tests ../../../../qa/tasks/mgr/dashboard
88 addopts = -rn --rcfile=.pylintrc --jobs={[pylint]jobs}
91 dirs = README.rst HACKING.rst
95 pylint
{[pylint]addopts
} {[pylint]dirs
}
99 rstcheck
--report info
--debug
-- {[rstlint]dirs
}
108 flake8 --config=tox.ini ../../../../qa/tasks/mgr/dashboard
110 isort ..
/..
/..
/..
/qa
/tasks
/mgr
/dashboard
--check
111 {[base
-pylint]commands
}
116 deps = {[base-lint]deps}
118 flake8 --config=tox.ini {posargs}
126 pylint
{[pylint]addopts
} {posargs
:{[pylint]dirs
}}
130 deps = {[base-lint]deps}
132 rstcheck
--report info
--debug
-- {posargs
:{[rstlint]dirs
}}
136 --max
-line
-length
{[flake8]max
-line
-length
}
137 --exclude
"{[flake8]exclude}"
140 # TODO: we should progressively increase the level of compliance with PEP8
150 autopep8
{[autopep8]addopts
} {posargs
:.
}
152 isort ..
/..
/..
/..
/qa
/tasks
/mgr
/dashboard
156 python ci
/check_grafana_dashboards.py frontend
/src
/app ..
/..
/..
/..
/monitoring
/grafana
/dashboards
158 [testenv:openapi-{check,fix}]
160 allowlist_externals = diff
162 check
: Ensure that auto
-generated OpenAPI Specification matches the current version
163 fix
: Update auto
-generated OpenAPI Specification with the latest changes
171 PYTHONPATH=$PYTHONPATH:..:../..
172 OPENAPI_FILE=openapi.yaml
173 check: OPENAPI_FILE_TMP={envtmpdir}/{env:OPENAPI_FILE}
175 python3
-m dashboard.controllers.docs
{env
:OPENAPI_FILE_TMP
:{env
:OPENAPI_FILE
}}
176 check
: diff
{env
:OPENAPI_FILE
} {env
:OPENAPI_FILE_TMP
}
178 [testenv:openapi-doc]
179 description = Generate Sphinx documentation from OpenAPI specification
180 deps = -r../../../../admin/doc-requirements.txt
181 changedir = ../../../../doc
182 commands = sphinx-build -W -b html -c . -D suppress_warnings=ref.* -d {envtmpdir}/doctrees mgr/ceph_api {envtmpdir}/html