1a050ec2c4
1. remove poetry dependency 2. add requirements.tx, test-requirements.txt, setup.py and setup.cfg 3. add more env into tox.ini 4. remove some command from Makefile 5. cleanup the dependencies 6. change some commands of README 7. update the devstack Depends-On: https://review.opendev.org/c/openstack/skyline-console/+/843257 Change-Id: I4cefc4cfdaadf7b3ba03ffe8441e9ae760772349
128 lines
2.6 KiB
INI
128 lines
2.6 KiB
INI
[tox]
|
|
minversion = 3.18.0
|
|
requires = virtualenv>=20.4.2
|
|
skipsdist = True
|
|
# python runtimes: https://governance.openstack.org/tc/reference/project-testing-interface.html#tested-runtimes
|
|
envlist = pep8,py38,functional
|
|
# this allows tox to infer the base python from the environment name
|
|
# and override any basepython configured in this file
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
usedevelop = True
|
|
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
allowlist_externals =
|
|
find
|
|
bash
|
|
isort
|
|
echo
|
|
passenv = *_proxy *_PROXY
|
|
|
|
[testenv:venv]
|
|
deps =
|
|
{[testenv]deps}
|
|
extras =
|
|
commands =
|
|
{posargs}
|
|
|
|
[testenv:policyenv]
|
|
deps =
|
|
{[testenv]deps}
|
|
description =
|
|
Policy Env.
|
|
extras =
|
|
commands =
|
|
bash tools/post_install.sh
|
|
{posargs}
|
|
|
|
[testenv:mypy]
|
|
description =
|
|
Run type checks.
|
|
envdir = {toxworkdir}/shared
|
|
extras =
|
|
commands =
|
|
bash tools/mypywrap.sh {posargs}
|
|
|
|
[testenv:pep8]
|
|
description =
|
|
Run style checks.
|
|
envdir = {toxworkdir}/shared
|
|
deps =
|
|
{[testenv]deps}
|
|
extras =
|
|
commands =
|
|
; {[testenv:mypy]commands}
|
|
isort --check-only --diff skyline_apiserver
|
|
black --check --diff --color skyline_apiserver --line-length 98
|
|
flake8 {posargs} .
|
|
|
|
[testenv:py38]
|
|
description =
|
|
Run pytest.
|
|
envdir = {toxworkdir}/shared
|
|
deps =
|
|
{[testenv]deps}
|
|
extras =
|
|
commands =
|
|
pytest
|
|
|
|
[testenv:releasenotes]
|
|
description =
|
|
Generate release notes.
|
|
commands =
|
|
sphinx-build -W --keep-going -b html -j auto releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:genswagger]
|
|
description =
|
|
Generate swagger files.
|
|
commands =
|
|
skyline-swagger-generator -o docs/api/swagger.json
|
|
|
|
[testenv:genconfig]
|
|
description =
|
|
Generate config files.
|
|
commands =
|
|
skyline-sample-config-generator -o etc/skyline.yaml.sample
|
|
|
|
[testenv:gennginx]
|
|
description =
|
|
Generate nginx config files.
|
|
deps =
|
|
{[testenv]deps}
|
|
skyline-console
|
|
commands =
|
|
skyline-nginx-generator -o etc/nginx.conf
|
|
|
|
[testenv:functional]
|
|
commands =
|
|
echo "TODO: Add functional test for skyline-apiserver"
|
|
|
|
[testenv:pep8-format]
|
|
description =
|
|
Run code format.
|
|
envdir = {toxworkdir}/shared
|
|
deps =
|
|
{[testenv]deps}
|
|
extras =
|
|
commands =
|
|
isort skyline_apiserver
|
|
black skyline_apiserver --line-length 98
|
|
|
|
[flake8]
|
|
# E203 whitespace before ':'
|
|
extend-ignore = E203
|
|
max-line-length = 99
|
|
max-doc-length = 99
|
|
show-source = True
|
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,releasenotes
|