[tox] envlist = py{37,38,39,310,311} skip_missing_interpreters = False ignore_basepython_conflict = True [flake8] max-line-length = 120 exclude = build/ .git __pycache__ .tox venv/ tests/ doc/ .eggs max-complexity = 10 ignore = C901, E203, FI10, FI11, FI12, FI13, FI14, FI15, FI16, FI17, FI18, FI50, FI51, FI52, FI53, FI54, FI55, FI56, FI57, W503 require-code = True [testenv] passenv = AWS_* SAGEMAKER_ENDPOINT COVERAGE_FILE # {posargs} can be passed in by additional arguments specified when invoking tox. # Can be used to specify which tests to run, e.g.: tox -- -s commands = coverage run --source smexperiments -m pytest {posargs} {env:IGNORE_COVERAGE:} coverage report --fail-under=95 extras = test deps = boto3 >= 1.12.8 python-dateutil pytest pytest-cov docker scikit-learn==0.24.2 [testenv:flake8] basepython = python3 skipdist = true skip_install = true deps = flake8 flake8-future-import commands = flake8 [testenv:black-format] # Used during development (before committing) to format .py files. deps = black commands = black -l 120 ./ [testenv:black-check] # Used during continuous integration deps = black commands = black -l 120 --check ./ [testenv:pylint] skipdist = true skip_install = true deps = pylint commands = python -m pylint --exit-zero --rcfile=.pylintrc -j 0 src/smexperiments [testenv:spelling] skipdist = true skip_install = true deps = pyenchant pylint commands = python -m pylint --disable all --enable spelling --spelling-dict en_US --rcfile=.pylintrc src/smexperiments [testenv:slow-tests] passenv = AWS_* SAGEMAKER_ENDPOINT # {posargs} can be passed in by additional arguments specified when invoking tox. # Can be used to specify which tests to run, e.g.: tox -- -s commands = pytest {posargs} --verbose --runslow --capture=no extras = test deps = boto3 >= 1.12.8 pytest docker [testenv:docs] basepython = python3 changedir = docs deps = Pygments docutils alabaster commonmark recommonmark sphinx sphinx-rtd-theme readthedocs-sphinx-ext commands = sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html [testenv:release] description = create a GitHub release, version number is derived from commit messages basepython = python3 passenv = GITHUB_* deps = PyGithub pathlib commands = python scripts/release.py {posargs} [testenv:upload-coverage] basepython = python3 deps = codecov passenv = CODECOV_UPLOAD_TOKEN commands = codecov -t {env:CODECOV_UPLOAD_TOKEN:} [testenv:docstyle] deps = pydocstyle commands = pydocstyle src/smexperiments [testenv:doclint] deps = darglint commands = darglint src/smexperiments [testenv:twine] deps = twine>=1.12.0 commands = python setup.py sdist twine check dist/*.tar.gz [testenv:collect-tests] # this needs to succeed for tests to display in some IDEs extras = test deps = boto3 >= 1.12.8 python-dateutil pytest pytest-cov docker commands = pytest --collect-only