"Fossies" - the Fresh Open Source Software Archive

Member "monasca-log-api-2.9.0/tox.ini" (1 Apr 2019, 4790 Bytes) of package /linux/misc/openstack/monasca-log-api-2.9.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) INI source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "tox.ini": 2.7.0_vs_2.9.0.

    1 [tox]
    2 envlist = py{27,35},pep8,cover
    3 minversion = 2.7
    4 skipsdist = True
    5 
    6 [testenv]
    7 usedevelop = True
    8 setenv = VIRTUAL_ENV={envdir}
    9          OS_TEST_PATH=monasca_log_api/tests
   10 passenv = *_proxy
   11           *_PROXY
   12 whitelist_externals = bash
   13                       find
   14                       rm
   15 install_command = pip install {opts} {packages}
   16 deps =
   17   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
   18   -r{toxinidir}/test-requirements.txt
   19   -r{toxinidir}/requirements.txt
   20 commands =
   21   find ./ -type f -name '*.pyc' -delete
   22   stestr run {posargs}
   23 
   24 [testenv:cover]
   25 description = Calculates code coverage
   26 basepython = python3
   27 setenv =
   28     PYTHON=coverage run --source monasca_log_api --parallel-mode
   29 commands =
   30   stestr run {posargs}
   31   coverage combine
   32   coverage html -d cover
   33   coverage xml -o cover/coverage.xml
   34 
   35 [testenv:debug]
   36 basepython = python3
   37 description = Allows to run unit-test with debug mode enabled
   38 commands =
   39   oslo_debug_helper -t {toxinidir}/monasca_log_api/tests {posargs}
   40 
   41 [testenv:bashate]
   42 basepython = python3
   43 description = Validates (pep8-like) devstack plugins
   44 skip_install = True
   45 usedevelop = False
   46 commands = bash {toxinidir}/tools/bashate.sh {toxinidir}/devstack
   47 
   48 [testenv:bandit]
   49 basepython = python3
   50 description = Validates codebase with bandit
   51 skip_install = True
   52 usedevelop = False
   53 commands =
   54   # FIXME(dmllr); B101 needs to be fixed first
   55   bandit -r monasca_log_api -n5 -s B101 -x monasca_log_api/tests
   56 
   57 [testenv:pep8]
   58 basepython = python3
   59 description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
   60 commands =
   61   {[testenv:flake8]commands}
   62   {[testenv:bandit]commands}
   63   {[testenv:bashate]commands}
   64   {[testenv:checkniceness]commands}
   65 
   66 [testenv:flake8]
   67 basepython = python3
   68 description = Validates codebase with flake
   69 commands =
   70   flake8 monasca_log_api
   71 
   72 [testenv:genconfig]
   73 basepython = python3
   74 description = Generates sample documentation file for monasca-log-api
   75 commands = oslo-config-generator --config-file=config-generator/monasca-log-api.conf
   76 
   77 [testenv:genpolicy]
   78 basepython = python3
   79 description = Generates sample policy.json file for monasca-log-api
   80 commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
   81 
   82 [testenv:docs]
   83 basepython = python3
   84 description = Builds main documention
   85 commands =
   86   {[testenv:devdocs]commands}
   87 
   88 [testenv:api-guide]
   89 basepython = python3
   90 description = Called from CI scripts to test and publish the API Guide
   91 commands =
   92   rm -rf api-guide/build
   93   {[testenv:checkjson]commands}
   94   sphinx-build -W -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
   95 
   96 [testenv:api-ref]
   97 basepython = python3
   98 description = Called from CI scripts to test and publish the API Ref
   99 commands =
  100   rm -rf api-ref/build
  101   {[testenv:checkjson]commands}
  102   sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
  103 
  104 [testenv:releasenotes]
  105 basepython = python3
  106 description = Called from CI script to test and publish the Release Notes
  107 commands =
  108   rm -rf releasenotes/build
  109   sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  110 
  111 [testenv:all-docs]
  112 basepython = python3
  113 description = Builds all docouments
  114 commands =
  115   {[testenv:devdocs]commands}
  116   {[testenv:api-guide]commands}
  117   {[testenv:api-ref]commands}
  118   {[testenv:releasenotes]commands}
  119 
  120 [testenv:devdocs]
  121 basepython = python3
  122 description = Builds developer documentation
  123 commands =
  124   rm -rf doc/build
  125   rm -rf doc/source/contributor/api
  126   {[testenv:checkjson]commands}
  127   python setup.py build_sphinx
  128 
  129 [testenv:checkniceness]
  130 basepython = python3
  131 description = Validates (pep-like) documenation
  132 skip_install = True
  133 usedevelop = False
  134 commands =
  135   doc8 --file-encoding utf-8 {toxinidir}/doc
  136   doc8 --file-encoding utf-8 {toxinidir}/api-ref
  137   doc8 --file-encoding utf-8 {toxinidir}/api-guide
  138   doc8 --file-encoding utf-8 {toxinidir}/releasenotes
  139 
  140 [testenv:checkjson]
  141 basepython = python3
  142 description = Validates all json samples inside doc folder
  143 skip_install = True
  144 usedevelop = False
  145 deps =
  146 whitelist_externals =
  147     bash
  148     python
  149     find
  150     rm
  151 commands =
  152   bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
  153   bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
  154 
  155 [testenv:venv]
  156 basepython = python3
  157 commands = {posargs}
  158 
  159 [flake8]
  160 max-line-length = 100
  161 exclude = .git,.tox,dist,doc,api-ref,api-guide,releasenotes,documentation,*.egg,build
  162 show-source = True
  163 enable-extensions = H203,H106
  164 
  165 [hacking]
  166 import_exceptions =
  167   six.moves
  168 
  169 [testenv:lower-constraints]
  170 basepython = python3
  171 deps =
  172   -c{toxinidir}/lower-constraints.txt
  173   -r{toxinidir}/test-requirements.txt
  174   -r{toxinidir}/requirements.txt