# Tox (http://tox.testrun.org/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] envlist = black-format,flake8,pylint,twine,py37,contrib_taei_py37 skip_missing_interpreters = False [testenv:black-format] # Used during development (before committing) to format .py files. basepython = python3 deps = black==19.10b0 commands = black -l 120 ./ [testenv:black-check] # Used by automated build steps to check that all files are properly formatted. basepython = python3 deps = black==19.10b0 commands = black -l 120 --check ./ [testenv:flake8] basepython = python3 skipdist = true skip_install = true deps = flake8 commands = flake8 [testenv:pylint] basepython = python3 skipdist = true skip_install = true deps = pylint==2.3.1 commands = python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker_sklearn_extension [testenv:twine] basepython = python3 # twine check was added starting in 1.12.0 deps = twine>=1.12.0 # https://github.com/pypa/twine/blob/master/docs/changelog.rst # https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup commands = python setup.py sdist twine check dist/*.tar.gz [testenv:py37] # {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 usedevelop = True deps = -r{toxinidir}/requirements.txt .[test] conda_deps = mlio-py=0.7 libprotobuf=3.13.0 conda_channels = conda-forge mlio commands = coverage run --source src/sagemaker_sklearn_extension --omit src/sagemaker_sklearn_extension/contrib/* -m pytest --ignore-glob=test/contrib/* --verbose {posargs} coverage report --fail-under=90 [testenv:contrib_taei_py37] # {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 usedevelop = True deps = -r{toxinidir}/requirements.txt .[test] .[taei] conda_deps = mlio-py=0.7 libprotobuf=3.13.0 conda_channels = conda-forge mlio commands = coverage run --source src/sagemaker_sklearn_extension/contrib/taei -m pytest test/contrib/taei --verbose {posargs} coverage report --fail-under=90