# 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 = py38, flake8 skip_missing_interpreters = False [travis] python = 3.8: py38, flake8 [flake8] max-line-length = 120 exclude = build/ .git __pycache__ examples/ *pb2.py .tox tests/data/ test/resources venv/ sagemaker-tensorflow-extensions benchmarks/ max-complexity = 10 ignore = C901, E203, # whitespace before ':': Black disagrees with and explicitly violates this. FI10, FI12, FI13, FI14, FI15, FI16, FI17, FI18, # __future__ import "annotations" missing -> check only Python 3.7 compatible FI50, FI51, FI52, FI53, FI54, FI55, FI56, FI57, W503 require-code = True [testenv] # TEAMCITY_VERSION environment variable exists during build on Teamcity. teamcity-messages uses it in order to enable # reporting to TeamCity. passenv = AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_CONTAINER_CREDENTIALS_RELATIVE_URI AWS_DEFAULT_REGION # {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 --rcfile .coveragerc_{envname} --source sagemaker_tensorflow_container -m py.test {posargs} {env:IGNORE_COVERAGE:} coverage report --include *sagemaker_tensorflow_container* --show-missing deps = .[test] [testenv:flake8] basepython = python deps = flake8 flake8-future-import flake8-import-order commands = flake8 --append-config .flake8 [testenv:twine] basepython = python3 # https://github.com/pypa/twine/blob/master/docs/changelog.rst deps = twine>=1.12.0 # https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup commands = python setup.py sdist twine check dist/*.tar.gz