Dorothydu's picture
Upload 50 random repository samples
9d3c8f5 verified
[tox]
requires =
# Pin virtualenv to the last version supporting 2.7 and 3.6
virtualenv<=20.21.1
ignore_basepython_conflict = True
skip_missing_interpreters = True
envlist =
about
stamp
autopep8
docformatter
isort
pylint
pylint_tests
flake8
flake8_tests
pydocstyle
mypy
sphinx
py{27,35,36,37,38,39,310,311,312}
####### Python Test Environments #######
[testenv]
basepython = python3.12
passenv =
TEST_QUICK
TEST_KEYBOARD
TEST_RAW
setenv =
TEST_QUICK = {env:TEST_QUICK:1}
deps =
pytest
pytest-cov
pytest-xdist
commands =
pytest {posargs: --strict-markers --verbose --durations=3} tests
[testenv:py312]
setenv =
TEST_QUICK = {env:TEST_QUICK:0}
TEST_KEYBOARD = {env:TEST_KEYBOARD:1}
deps =
{[testenv]deps}
pytest-rerunfailures
commands =
pytest {posargs: --reruns 5 --strict-markers --verbose --durations=3} tests
[testenv:py27]
setenv =
TEST_QUICK = {env:TEST_QUICK:0}
TEST_KEYBOARD = {env:TEST_KEYBOARD:1}
deps =
mock
pytest <= 4.7
pytest-cov # 2.7 still supported as of 2.12.1
pytest-xdist==1.34.0
####### Linting and Formatting Environments #######
[testenv:autopep8]
deps =
autopep8
commands =
autopep8 --in-place --recursive --aggressive --aggressive blessed/ bin/ setup.py
[testenv:docformatter]
# docformatter pinned due to https://github.com/PyCQA/docformatter/issues/264
deps =
docformatter<1.7.4
untokenize
commands =
docformatter \
--in-place \
--recursive \
--pre-summary-newline \
--wrap-summaries=100 \
--wrap-descriptions=100 \
{toxinidir}/blessed/ \
{toxinidir}/bin \
{toxinidir}/setup.py \
{toxinidir}/docs/conf.py
[testenv:docformatter_check]
# docformatter pinned due to https://github.com/PyCQA/docformatter/issues/264
deps =
docformatter<1.7.4
untokenize
commands =
docformatter \
--check \
--recursive \
--pre-summary-newline \
--wrap-summaries=100 \
--wrap-descriptions=100 \
{toxinidir}/blessed/ \
{toxinidir}/bin \
{toxinidir}/setup.py \
{toxinidir}/docs/conf.py
[testenv:flake8]
deps =
flake8
commands =
flake8 --exclude=tests,docs/sphinxext/github.py setup.py docs/ blessed/ bin/
[testenv:flake8_tests]
deps =
{[testenv:flake8]deps}
commands =
flake8 --ignore=W504,F401 tests/
[testenv:isort]
deps =
{[testenv]deps}
-r docs/requirements.txt
isort
commands =
isort blessed
[testenv:isort_check]
deps =
{[testenv:isort]deps}
commands =
isort --diff --check-only blessed
[testenv:linkcheck]
deps =
-r {toxinidir}/docs/requirements.txt
commands =
sphinx-build -v -W -d {toxinidir}/docs/_build/doctrees -b linkcheck docs docs/_build/linkcheck
[testenv:mypy]
deps =
mypy
commands =
mypy --strict {toxinidir}/blessed
[testenv:pydocstyle]
deps =
pydocstyle
restructuredtext_lint
doc8
pygments
commands =
pydocstyle --source --explain {toxinidir}/blessed
rst-lint README.rst
doc8 --ignore-path docs/_build --ignore D000 docs
[testenv:pylint]
deps =
pylint
commands =
pylint {posargs} blessed
[testenv:pylint_tests]
deps =
pylint
commands =
pylint \
--disable invalid-name,import-error,import-outside-toplevel \
--disable protected-access,superfluous-parens,unused-argument \
{posargs} tests
[testenv:lint]
deps =
{[testenv:docformatter_check]deps}
{[testenv:flake8]deps}
{[testenv:flake8_tests]deps}
{[testenv:isort_check]deps}
{[testenv:mypy]deps}
{[testenv:pydocstyle]deps}
{[testenv:pylint]deps}
{[testenv:pylint_tests]deps}
commands =
{[testenv:docformatter_check]commands}
{[testenv:flake8]commands}
{[testenv:flake8_tests]commands}
{[testenv:isort_check]commands}
{[testenv:mypy]commands}
{[testenv:pydocstyle]commands}
{[testenv:pylint]commands}
{[testenv:pylint_tests]commands}
####### Utility Environments #######
[testenv:about]
basepython = {env:TOXPYTHON:{[testenv]basepython}}
commands =
python -VV
python {toxinidir}/bin/display-sighandlers.py
python {toxinidir}/bin/display-terminalinfo.py
python {toxinidir}/bin/display-fpathconf.py
[testenv:develop]
commands =
{posargs}
[testenv:publish_static]
# Synchronize the artifacts in docs/_static/ with https://dxtz6bzwq9sxx.cloudfront.net/
deps =
awscli
commands =
aws s3 sync --exclude '*.DS_Store*' --delete --acl=public-read docs/_static/ s3://python-blessed/
[testenv:sphinx]
deps =
-r {toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-v -W -d {toxinidir}/docs/_build/doctrees -b html docs {toxinidir}/docs/_build/html}
[testenv:stamp]
commands =
python {toxinidir}/version.py
####### TOOL CONFIGS #######
[coverage:run]
branch = True
parallel = True
source =
blessed
omit =
tests/*
data_file = .coverage.${TOX_ENV_NAME}
[coverage:report]
precision = 1
exclude_lines =
pragma: no cover
[doc8]
max-line-length = 100
[flake8]
max-line-length = 100
exclude = .tox,build
[isort]
line_length = 100
indent = ' '
multi_line_output = 1
length_sort = 1
import_heading_stdlib = std imports
import_heading_thirdparty = 3rd party
import_heading_firstparty = local
import_heading_localfolder = local
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
no_lines_before=LOCALFOLDER
known_third_party = jinxed
atomic = true
[pydocstyle]
ignore =
D101, # Missing docstring in public class
D105, # Missing docstring in magic method
D203, # 1 blank line required before class docstring
D204, # 1 blank line required after class docstring
D212, # Multi-line docstring summary should start at the first line
D401 # First line should be in imperative mood
[pytest]
addopts =
--color=yes
--cov
--cov-append
--cov-report=xml
--disable-pytest-warnings
--ignore=setup.py
--ignore=.tox
--junit-xml=.tox/results.{envname}.xml
filterwarnings = error
junit_family = xunit1
log_format=%(levelname)s %(relativeCreated)2.2f %(filename)s:%(lineno)d %(message)s
norecursedirs = .git .tox build