Skip to content

Commit

Permalink
Create tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
sksalahuddin2828 authored Jun 15, 2023
1 parent 25a920b commit ba71426
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[tox]
minversion = 4.4.4
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
envlist =
py37,
py38,
py39,
py310,
docs,
lint,
type,
isolated_build = true

[testenv]
description = run the test driver with {basepython}
passenv =
PYTEST_XDIST_WORKER_COUNT
PROGRAMDATA
PROGRAMFILES(X86)
PYTEST_ADDOPTS
deps = -rtest-requirements.txt
commands = python -m pytest {posargs}

[testenv:dev]
description = generate a DEV environment, that has all project libraries
usedevelop = True
deps =
-rtest-requirements.txt
-rdocs/requirements-docs.txt
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'

[testenv:docs]
description = invoke sphinx-build to build the HTML docs
passenv =
VERIFY_MYPY_ERROR_CODES
deps = -rdocs/requirements-docs.txt
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'

[testenv:lint]
description = check the code style
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure

[testenv:type]
description = type check ourselves
passenv =
TERM
MYPY_FORCE_COLOR
MYPY_FORCE_TERMINAL_WIDTH
commands =
python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc
python -m mypy --config-file mypy_self_check.ini misc --exclude misc/fix_annotate.py --exclude misc/async_matrix.py --exclude misc/sync-typeshed.py

0 comments on commit ba71426

Please sign in to comment.