| |
| |
| |
| |
|
|
| [tox] |
| envlist = black-format,flake8,pylint,docstyle,sphinx,doc8,twine,py37,py38,py39,py310 |
|
|
| skip_missing_interpreters = False |
|
|
| [flake8] |
| max-line-length = 120 |
| exclude = |
| build/ |
| .git |
| __pycache__ |
| examples/ |
| *pb2.py |
| .tox |
| tests/data/ |
| venv/ |
| env/ |
|
|
| max-complexity = 10 |
|
|
| ignore = |
| C901, |
| E203, |
| FI10, |
| FI12, |
| FI13, |
| FI14, |
| FI15, |
| FI16, |
| FI17, |
| FI18, |
| FI50, |
| FI51, |
| FI52, |
| FI53, |
| FI54, |
| FI55, |
| FI56, |
| FI57, |
| W503 |
|
|
| require-code = True |
|
|
| [doc8] |
| ignore-path=.tox,src/sagemaker.egg-info |
| |
| ignore=D001 |
|
|
| [pytest] |
| markers = |
| canary_quick |
| cron |
| local_mode |
| timeout: mark a test as a timeout. |
|
|
| [testenv] |
| setenv = |
| PYTHONHASHSEED=42 |
| pip_version = pip==21.3 |
| passenv = |
| AWS_ACCESS_KEY_ID |
| AWS_SECRET_ACCESS_KEY |
| AWS_SESSION_TOKEN |
| AWS_CONTAINER_CREDENTIALS_RELATIVE_URI |
| AWS_DEFAULT_REGION |
| PYTHONHASHSEED |
| |
| |
| commands = |
| python -c "import os |
| pytest --cov=sagemaker --cov-append {posargs} |
| {env:IGNORE_COVERAGE:} coverage report -i --fail-under=86 |
| deps = .[test] |
| depends = |
| {py37,py38,py39,py310}: clean |
|
|
| [testenv:flake8] |
| skipdist = true |
| skip_install = true |
| commands = |
| pip install --exists-action=w -r requirements/tox/flake8_requirements.txt |
| flake8 |
|
|
| [testenv:pylint] |
| skipdist = true |
| skip_install = true |
| commands = |
| pip install --exists-action=w -r requirements/tox/pylint_requirements.txt |
| python -m pylint --rcfile=.pylintrc -j 0 src/sagemaker |
|
|
| [testenv:spelling] |
| skipdist = true |
| skip_install = true |
| commands = |
| pip install --exists-action=w -r requirements/tox/spelling_requirements.txt |
| python -m pylint --rcfile=.pylintrc --disable all --enable spelling --spelling-dict en_US src/sagemaker/{posargs} |
|
|
| [testenv:twine] |
| |
| commands = |
| pip install --exists-action=w -r requirements/tox/twine_requirements.txt |
| python setup.py sdist |
| twine check dist/*.tar.gz |
|
|
| [testenv:sphinx] |
| pip_version = pip==21.3 |
| changedir = doc |
| |
| |
| |
| commands = |
| pip install --exists-action=w -r requirements.txt |
| sphinx-build -T -W -b html -d _build/doctrees-readthedocs -D language=en . _build/html |
|
|
| [testenv:doc8] |
| commands = |
| pip install --exists-action=w -r requirements/tox/doc8_requirements.txt |
| doc8 |
|
|
| [testenv:black-format] |
| |
| setenv = |
| LC_ALL=C.UTF-8 |
| LANG=C.UTF-8 |
| commands = |
| black -l 100 ./ |
|
|
| [testenv:black-check] |
| |
| setenv = |
| LC_ALL=C.UTF-8 |
| LANG=C.UTF-8 |
| commands = |
| black -l 100 --check ./ |
|
|
| [testenv:clean] |
| skip_install = true |
| commands = |
| coverage erase |
|
|
| [testenv:typing] |
| commands = |
| pip install --exists-action=w -r requirements/tox/mypy_requirements.txt |
| mypy src/sagemaker |
|
|
| [testenv:docstyle] |
| commands = |
| pip install --exists-action=w -r requirements/tox/pydocstyle_requirements.txt |
| pydocstyle src/sagemaker |
|
|
| [testenv:collect-tests] |
| |
| deps = .[test] |
| commands = |
| pytest --collect-only |
|
|