<commit_before>[tox]
skipsdist=True
envlist = py27
indexserver =
    default = https://pypi.python.org/simple
    private = https://pypi.yelpcorp.com/simple

[testenv]
setenv=
    TZ = UTC
deps =
    --requirement={toxinidir}/requirements-dev.txt
    --editable={toxinidir}
commands =
    py.test {posargs:tests}


[testenv:coverage]
setenv=
    TZ = UTC
basepython = python2.7
deps =
    --requirement={toxinidir}/requirements-dev.txt
    --editable={toxinidir}
commands =
    python -m pytest --cov-config .coveragerc --cov=paasta_tools --cov-report=term-missing --cov-report=html -s {posargs:tests}


[testenv:docs]
basepython = python2.7
deps =
    {[testenv]deps}
commands =
    /bin/rm -rf docs/source/generated/
    # The last arg to apidoc is a list of excluded paths
    sphinx-apidoc -f -e -o docs/source/generated/ paasta_tools
    sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html

[testenv:manpages]
basepython = python2.7
deps =
    {[testenv]deps}
install_command= pip install {opts} {packages}
commands = ./build-manpages.sh

[testenv:paasta_itests]
basepython = python2.7
changedir=paasta_itests/
passenv = <PASSWORD>_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
    docker-compose==1.7.1
commands =
    docker-compose pull
    docker-compose --verbose build
    # Fire up the marathon cluster in background
    docker-compose up -d mesosmaster mesosslave marathon chronos hacheck
    docker-compose scale mesosslave=3
    # Run the paastatools container in foreground to catch the output
    # the `docker-compose run` vs `docker-compose up` is important here, as docker-compose run will
    # exit with the right code.
    #
    # dnephin says we need the --rm otherwise these containers won't be cleaned
    # up. I guess we only need this for run'd containers, not up'd containers?
    # IDK, the docs don't really specify.
    docker-compose run --rm paastatools tox -e paasta_itests_inside_container -- --no-capture {posargs}
    docker-compose stop
    docker-compose rm --force

[testenv:paasta_itests_inside_container]
basepython = python2.7
envdir=/tmp/
setenv =
    DOCKER_COMPOSE_PROJECT_NAME = paastatools_inside_container
changedir=paasta_itests/
deps =
    {[testenv]deps}
    behave==1.2.4
    behave-pytest==0.1.1
    # This .whl is created in yelp_package/dockerfiles/trusty/Dockerfile
    /root/mesos.native-0.28.2-py27-none-any.whl
commands =
    python -m behave {posargs}

[testenv:general_itests]
setenv =
    PAASTA_SYSTEM_CONFIG_DIR = {toxinidir}/general_itests/fake_etc_paasta
basepython = python2.7
changedir=general_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
    {[testenv]deps}
    behave==1.2.4
    behave-pytest==0.1.1
commands =
    pre-commit install -f --install-hooks
    pre-commit run --all-files
    pylint -E paasta_tools/mesos/ --ignore master.py,task.py
    python -m behave {posargs}

[flake8]<commit_msg>Fix mesos.native<commit_after>[tox]
skipsdist=True
envlist = py27
indexserver =
    default = https://pypi.python.org/simple
    private = https://pypi.yelpcorp.com/simple

[testenv]
setenv=
    TZ = UTC
deps =
    --requirement={toxinidir}/requirements-dev.txt
    --editable={toxinidir}
commands =
    py.test {posargs:tests}


[testenv:coverage]
setenv=
    TZ = UTC
basepython = python2.7
deps =
    --requirement={toxinidir}/requirements-dev.txt
    --editable={toxinidir}
commands =
    python -m pytest --cov-config .coveragerc --cov=paasta_tools --cov-report=term-missing --cov-report=html -s {posargs:tests}


[testenv:docs]
basepython = python2.7
deps =
    {[testenv]deps}
commands =
    /bin/rm -rf docs/source/generated/
    # The last arg to apidoc is a list of excluded paths
    sphinx-apidoc -f -e -o docs/source/generated/ paasta_tools
    sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html

[testenv:manpages]
basepython = python2.7
deps =
    {[testenv]deps}
install_command= pip install {opts} {packages}
commands = ./build-manpages.sh

[testenv:paasta_itests]
basepython = python2.7
changedir=paasta_itests/
passenv = <PASSWORD> DOCKER_HOST DOCKER_CERT_PATH
deps =
    docker-compose==1.7.1
commands =
    docker-compose pull
    docker-compose --verbose build
    # Fire up the marathon cluster in background
    docker-compose up -d mesosmaster mesosslave marathon chronos hacheck
    docker-compose scale mesosslave=3
    # Run the paastatools container in foreground to catch the output
    # the `docker-compose run` vs `docker-compose up` is important here, as docker-compose run will
    # exit with the right code.
    #
    # dnephin says we need the --rm otherwise these containers won't be cleaned
    # up. I guess we only need this for run'd containers, not up'd containers?
    # IDK, the docs don't really specify.
    docker-compose run --rm paastatools tox -e paasta_itests_inside_container -- --no-capture {posargs}
    docker-compose stop
    docker-compose rm --force

[testenv:paasta_itests_inside_container]
basepython = python2.7
envdir=/tmp/
setenv =
    DOCKER_COMPOSE_PROJECT_NAME = paastatools_inside_container
changedir=paasta_itests/
deps =
    {[testenv]deps}
    behave==1.2.4
    behave-pytest==0.1.1
    # This .whl is created in yelp_package/dockerfiles/trusty/Dockerfile
    /root/mesos.native-1.0.1-py27-none-any.whl
commands =
    python -m behave {posargs}

[testenv:general_itests]
setenv =
    PAASTA_SYSTEM_CONFIG_DIR = {toxinidir}/general_itests/fake_etc_paasta
basepython = python2.7
changedir=general_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
    {[testenv]deps}
    behave==1.2.4
    behave-pytest==0.1.1
commands =
    pre-commit install -f --install-hooks
    pre-commit run --all-files
    pylint -E paasta_tools/mesos/ --ignore master.py,task.py
    python -m behave {posargs}

[flake8]
{'fraction_non_alphanumeric': 0.10489270386266095, 'fraction_numerical': 0.012532188841201717, 'mean_word_length': 3.548009367681499, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1801595', 'n_tokens_mistral': 2178, 'n_tokens_neox': 2082, 'n_words': 496}