[tox] minversion = 3.16.1 # linters is run last because it may catch if 'py' updates tracked files envlist = py,linters isolated_build = true requires = setuptools >= 41.4.0 pip >= 19.3.0 tox-bindep # tox-extra ensures tox fails if there are untacked git or repo is dirty tox-extra skip_missing_interpreters = True # `usedevelop = true` overrides `skip_install` instruction, it's unwanted usedevelop = false [testenv] deps = -r requirements.txt commands = python3 src/model.py bash -c "cat src/data/queries.yml | yq | jsonschema -i /dev/stdin output/queries-schema.json" passenv = CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437 FORCE_COLOR HOME NO_COLOR PYTEST_* # allows developer to define their own preferences PY_COLORS REQUESTS_CA_BUNDLE # https proxies SSL_CERT_FILE # https proxies # recreate = True setenv = PIP_DISABLE_PIP_VERSION_CHECK = 1 PRE_COMMIT_COLOR = always skip_install = true allowlist_externals = bash [testenv:deps] description = Update dependency lock files deps = pip-tools >= 6.1.0 commands = pip-compile -o requirements.txt requirements.in [testenv:linters] description = Run all linters basepython = python3 deps = pre-commit>=2.6.0 skip_install = true commands = {envpython} -m pre_commit run {posargs:--all-files --hook-stage manual -v} passenv = {[testenv]passenv} PRE_COMMIT_HOME