[tox] envlist = flake,pylint,py312-coverage,py310-install skipsdist = True setenv = PIP_CONFIG_FILE=.pip.conf allowlist_externals = rm bash [testenv] setenv = coverage: SETUPTOOLS_ENABLE_FEATURES = legacy-editable CCACHE_DIR = {envdir}/.ccache COMPILE_WITH_TESTS = true LC_ALL = C.UTF-8 LANG = C.UTF-8 SCHEMA_PATH={toxinidir}/doc/api_schema.yaml POLEMARCH_EXECUTOR_PYTHON={envdir}/pmansible/bin/python ANSIBLE_PYTHON_INTERPRETER={envdir}/pmansible/bin/python TMPDIR={envdir}/tmp COVERAGE_FILE={envdir}/.coverage passenv = DJANGO_LOG_LEVEL CC BUILD_COMPILE allowlist_externals = rm ls ln bash mkdir {envdir}/pmansible/bin/python commands = rm -rf {envdir}/tmp mkdir -p {envdir}/tmp -pip install -U 'pip~=24.0' python -m virtualenv -p python3.10 {envdir}/pmansible {envdir}/pmansible/bin/python -m pip install -U 'polemarch-ansible~=3.0.1' 'ansible-core~=2.17.7' install: -pip uninstall polemarch -y install: rm -rfv {envdir}/dist/ install: pip wheel {toxinidir} -w {envdir}/dist/ --no-deps install: bash -c "export BUILD_COMPILE=true; pip install -U {envdir}/dist/$(ls {envdir}/dist)[test]" coverage: pip install -U -e .[test] install: rm -f {envdir}/tests.py {envdir}/tests.pyc install: rm -rf {envdir}/test_data install: ln -s {toxinidir}/test_data {envdir}/test_data install: ln -s {toxinidir}/tests.py {envdir}/tests.py install: python -m polemarch test -v 2 --failfast coverage: python -m polemarch makemigrations main --check coverage: coverage debug sys coverage: coverage erase coverage: coverage run -m polemarch test -v 2 --failfast {posargs} coverage: coverage combine coverage: coverage report rm -rf .eggs build polemarch.egg-info {envdir}/dist deps = -rrequirements.txt -rrequirements-git.txt -rrequirements-test.txt virtualenv [testenv:flake] basepython = python3.10 deps = flake8==6.0.0 flake8-bugbear==23.7.10 flake8-commas==2.1.0 flake8-comprehensions==3.14.0 flake8-django==1.3.0 flake8-executable==2.1.3 flake8-functions==0.0.8 flake8-import-order==0.18.2 Flake8-pyproject==1.2.3 commands = flake8 polemarch flake8 --ignore=CFQ001,C812 tests.py [testenv:pylint] basepython = python3.10 deps = pylint==3.3.1 pylint-django==2.5.5 pylint-plugin-utils==0.8.2 -rrequirements.txt -rrequirements-git.txt commands = pip uninstall polemarch -y pip install -U -e . pylint --rcfile=./.pylintrc {posargs} polemarch [testenv:js_style] changedir = ./ deps = allowlist_externals = yarn commands = yarn install yarn lint [testenv:build] basepython = python3.10 setenv = LC_ALL = en_US.UTF-8 LANG = en_US.UTF-8 passenv = * changedir = . allowlist_externals = tox rm deps = tox~=4.0 commands = rm -rf dist build tox -c tox_build.ini -e py310-build,py310-wheel --workdir {toxworkdir} [testenv:builddoc] basepython = python3.11 changedir = ./doc/ allowlist_externals = make setenv = READTHEDOCS = true commands = make html ; make latexpdf deps = -rrequirements-rtd.txt [testenv:build_for_docker] basepython = python3.12 skipsdist = True setenv = CCACHE_DIR = {envdir}/.ccache BUILD_OPTIMIZATION = true BUILD_COMPILE = true passenv = * allowlist_externals = * commands = sphinx-build --builder html ./doc ./polemarch/doc/html pip wheel .[mysql,postgresql,ansible-core,production] -w wheels deps = -rrequirements-doc.txt polemarch-ansible~=3.0 vstcompile~=3.0 pip~=23.3.1 wheel cython~=3.0.11 setuptools>=61.2 [testenv:release] basepython = python3.10 toxworkdir = ./ passenv = * setenv = LC_ALL = en_US.UTF-8 LANG = en_US.UTF-8 allowlist_externals = mkdir ls commands = mkdir -p dist ls -la dist python setup.py githubrelease deps = githubrelease [testenv:contrib] basepython = python3.10 skipsdist = False usedevelop = True envdir = {toxinidir}/env setenv = CCACHE_DIR = {envdir}/.ccache LC_ALL = en_US.UTF-8 LANG = en_US.UTF-8 passenv = * allowlist_externals = * commands = pip install -U -e .[test] deps = cython>0.29,<0.30 tox~=4.0 pip~=23.0 [testenv:release-docker] passenv = * setenv = LC_ALL = en_US.UTF-8 LANG = en_US.UTF-8 allowlist_externals = /usr/bin/bash docker git ./autobuild.sh commands = bash ./autobuild.sh deps = docker-compose~=1.29.2