[tox]
envlist = {pep8,cdh,hdp,nonhdfs}
skipsdist = True

[testenv]
usedevelop = True
deps=
  -r{toxinidir}/test/requirements.txt
  py26: unittest2
  coverage>=3.6,<3.999
  coveralls
setenv =
  cdh: HADOOP_DISTRO=cdh
  cdh: HADOOP_HOME=/tmp/hadoop-cdh
  hdp: HADOOP_DISTRO=hdp
  hdp: HADOOP_HOME=/tmp/hadoop-hdp
  cdh,hdp: NOSE_ATTR=minicluster
  nonhdfs: NOSE_ATTR=!minicluster
  LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/client.cfg
commands =
  cdh,hdp: {toxinidir}/scripts/ci/setup_hadoop_env.sh
  coverage run test/runtests.py -v {posargs:}
  coveralls

[testenv:pep8]
deps = pep8
commands = pep8 --ignore E501 luigi test examples bin

[testenv:autopep8]
deps = autopep8
commands = autopep8 --ignore E309,E501 -a -i -r luigi test examples bin

[testenv:docs]
# to call this use `tox -e docs -- html`
deps =
  sqlalchemy
  Sphinx
  sphinx_rtd_theme
changedir = doc
commands = /usr/bin/make {posargs}

[tox]
envlist = {pep8,cdh,hdp,nonhdfs}
skipsdist = True

[testenv]
usedevelop = True
deps=
  -r{toxinidir}/test/requirements.txt
  py26: unittest2
  coverage>=3.6,<3.999
  coveralls
setenv =
  cdh: HADOOP_DISTRO=cdh
  cdh: HADOOP_HOME=/tmp/hadoop-cdh
  hdp: HADOOP_DISTRO=hdp
  hdp: HADOOP_HOME=/tmp/hadoop-hdp
  cdh,hdp: NOSE_ATTR=minicluster
  nonhdfs: NOSE_ATTR=!minicluster
  LUIGI_CONFIG_PATH={toxinidir}/test/testconfig/client.cfg
commands =
  cdh,hdp: {toxinidir}/scripts/ci/setup_hadoop_env.sh
  coverage run test/runtests.py -v {posargs:}
  coveralls

[testenv:pep8]
deps = pep8
commands = pep8 --ignore E501 luigi test examples bin

[testenv:autopep8]
deps = autopep8
commands = autopep8 --ignore E309,E501 -a -i -r luigi test examples bin

[testenv:docs]
deps =
  sqlalchemy
  Sphinx
  sphinx_rtd_theme
commands = sphinx-build -b html -d {envtmpdir}/doctrees doc doc/_build/html

Use sphinx-build as it is more Windows friendly.
Use sphinx-build as it is more Windows friendly.

* Use sphinx-build
* User should not read tox.ini in order to understand how to use it,
  so use html as default output format.
* Kept same output dir for html just in case.
