<commit_before>[tox]
envlist = py{27,34,35,36}-django{18,19},lint

[testenv]
deps =
  django18: django~=1.8.0
  django19: django~=1.9.0

  # Test requirements
  coverage~=4.0
  httpretty~=0.8.14
  mock~=1.3
  pytest~=3.0
  pytest_cov~=2.4
  pytest_django~=3.1
  
commands = pytest --cov

[testenv:lint]
deps =
  # Dependencies are pinned so that linting is consistent
  bandit==1.4.0
  flake8==2.5.4
commands =
  flake8 fr_notices regulations
  bandit -r --ini tox.ini fr_notices regulations manage.py setup.py

[bandit]
exclude = fr_notices/tests,regulations/tests,regulations/uitests

[coverage:run]
source = regulations,fr_notices
omit = regulations/uitests/*,regulations/tests/*,fr_notices/tests/*

[flake8]
exclude = regulations/settings/*.py<commit_msg>Add docs-building task to tox.<commit_after>[tox]
envlist = py{27,34,35,36}-django{18,19},lint,docs

[testenv]
deps =
  django18: django~=1.8.0
  django19: django~=1.9.0

  # Test requirements
  coverage~=4.0
  httpretty~=0.8.14
  mock~=1.3
  pytest~=3.0
  pytest_cov~=2.4
  pytest_django~=3.1
  
commands = pytest --cov

[testenv:lint]
deps =
  # Dependencies are pinned so that linting is consistent
  bandit==1.4.0
  flake8==2.5.4
commands =
  flake8 fr_notices regulations
  bandit -r --ini tox.ini fr_notices regulations manage.py setup.py

[testenv:docs]
deps = sphinx
commands =
  # Tox won't do wildcard expansion, so run in a shell
  sh -c "rm -f docs/regulations*.rst docs/fr_notices*.rst"
  sphinx-apidoc -F -o docs fr_notices
  sphinx-apidoc -F -o docs regulations
  sphinx-build -b dirhtml -d docs/_build/doctrees/ docs/ docs/_build/dirhtml/
whitelist_externals = sh

[bandit]
exclude = fr_notices/tests,regulations/tests,regulations/uitests

[coverage:run]
source = regulations,fr_notices
omit = regulations/uitests/*,regulations/tests/*,fr_notices/tests/*

[flake8]
exclude = regulations/settings/*.py
{'fraction_non_alphanumeric': 0.1312, 'fraction_numerical': 0.048, 'mean_word_length': 4.225626740947075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1124763', 'n_tokens_mistral': 795, 'n_tokens_neox': 736, 'n_words': 152}