<commit_before>[tox]
envlist = py37,pep8,,py36-local,py3-{dj111,dj22},eslint,karma-local,docs-local,releasenotes,lower-constraints-local
minversion = 2.3.2
skipsdist = True

[testenv]
basepython = python3
usedevelop = True
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
commands =
  dj111: pip install django>=1.11,<2
  dj22: pip install django>=2.2,<2.3
  python manage.py test {posargs} --settings=senlin_dashboard.test.settings

# For installation of horizon on local
# NOTICE: this tox.ini requires horizon repository cloned in sibling directory.
[testenv:hz-local]
commands =
  pip install -e ../horizon

[testenv:venv]
commands = {posargs}

[testenv:pep8]
commands = flake8

[flake8]
show-source = True
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
ignore = F405
enable-extensions = H203,H106
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,node_modules

[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'

# NOTE(shu-mutow): On CI infra, horizon will be installed
# according to job setting. but on local, we need to install
# horizon from master branch.
[testenv:py36-local]
basepython = python3.6
commands =
  {[testenv:hz-local]commands}
  {[testenv]commands}

[testenv:eslint]
whitelist_externals =
  npm
commands =
  npm install
  npm run lint

# NOTE(shu-mutow): The "postinstall" script on package.json will install horizon
# from master branch into py35 environment for testing javascripts.
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
[testenv:karma]
whitelist_externals =
  {[testenv:eslint]whitelist_externals}
commands =
  npm install
  npm run test

[testenv:karma-local]
whitelist_externals =
  {[testenv:eslint]whitelist_externals}
commands =
  {[testenv:karma]commands}

[testenv:docs]
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/doc/requirements.txt
commands=
  sphinx-build -W -b html doc/source doc/build/html

[testenv:docs-local]
deps =
  {[testenv:docs]deps}
commands=
  {[testenv:hz-local]commands}
  {[testenv:docs]commands}<commit_msg>Add requirements.txt to docs reqs<commit_after>[tox]
envlist = py37,pep8,,py36-local,py3-{dj111,dj22},eslint,karma-local,docs-local,releasenotes,lower-constraints-local
minversion = 2.3.2
skipsdist = True

[testenv]
basepython = python3
usedevelop = True
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
commands =
  dj111: pip install django>=1.11,<2
  dj22: pip install django>=2.2,<2.3
  python manage.py test {posargs} --settings=senlin_dashboard.test.settings

# For installation of horizon on local
# NOTICE: this tox.ini requires horizon repository cloned in sibling directory.
[testenv:hz-local]
commands =
  pip install -e ../horizon

[testenv:venv]
commands = {posargs}

[testenv:pep8]
commands = flake8

[flake8]
show-source = True
# F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
ignore = F405
enable-extensions = H203,H106
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,node_modules

[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'

# NOTE(shu-mutow): On CI infra, horizon will be installed
# according to job setting. but on local, we need to install
# horizon from master branch.
[testenv:py36-local]
basepython = python3.6
commands =
  {[testenv:hz-local]commands}
  {[testenv]commands}

[testenv:eslint]
whitelist_externals =
  npm
commands =
  npm install
  npm run lint

# NOTE(shu-mutow): The "postinstall" script on package.json will install horizon
# from master branch into py35 environment for testing javascripts.
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
[testenv:karma]
whitelist_externals =
  {[testenv:eslint]whitelist_externals}
commands =
  npm install
  npm run test

[testenv:karma-local]
whitelist_externals =
  {[testenv:eslint]whitelist_externals}
commands =
  {[testenv:karma]commands}

[testenv:docs]
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  # senlin-dashboard doc generated the module reference,
  # so requirements.txt should be here to apply upper-constraints.
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/doc/requirements.txt
commands=
  sphinx-build -W -b html doc/source doc/build/html

[testenv:docs-local]
deps =
  {[testenv:docs]deps}
commands=
  {[testenv:hz-local]commands}
  {[testenv:docs]commands}
{'fraction_non_alphanumeric': 0.11662225865956138, 'fraction_numerical': 0.020086083213773313, 'mean_word_length': 5.240409207161125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3028785', 'n_tokens_mistral': 1846, 'n_tokens_neox': 1703, 'n_words': 408}