"Fossies" - the Fresh Open Source Software Archive

Member "monasca-api-4.0.0/tox.ini" (13 May 2020, 4808 Bytes) of package /linux/misc/openstack/monasca-api-4.0.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": 3.1.0_vs_4.0.0.

    1 [tox]
    2 envlist = py37,pep8,cover
    3 minversion = 2.7
    4 skipsdist = True
    5 
    6 [testenv]
    7 basepython = python3
    8 setenv =
    9     VIRTUAL_ENV={envdir}
   10     OS_TEST_PATH=monasca_api/tests
   11 passenv = *_proxy
   12           *_PROXY
   13 usedevelop = True
   14 install_command = pip install {opts} {packages}
   15 deps =
   16   -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
   17   -r{toxinidir}/test-requirements.txt
   18   -r{toxinidir}/requirements.txt
   19   .[influxdb,cassandra]
   20 whitelist_externals = bash
   21                       find
   22                       rm
   23 commands =
   24   find . -type f -name "*.pyc" -delete
   25   stestr run {posargs}
   26 
   27 [testenv:cover]
   28 commands =
   29   coverage erase
   30   python setup.py test --coverage --testr-args='{posargs}' \
   31     --coverage-package-name=monasca_api --omit=monasca_api/hacking/*
   32   coverage report
   33 
   34 [testenv:debug]
   35 commands =
   36   oslo_debug_helper -t ./monasca_api/tests {posargs}
   37 
   38 [testenv:flake8]
   39 skip_install = True
   40 usedevelop = False
   41 commands =
   42   flake8 monasca_api
   43 
   44 [testenv:bandit]
   45 skip_install = True
   46 usedevelop = False
   47 commands =
   48   # B101(assert_ussed) - API uses asserts because of performance reasons
   49   # B303 - Fingerprint class uses SHA1 to map fingerprints to alembic revisions.
   50   bandit -r monasca_api -n5 -s B101,B303 -x monasca_api/tests
   51 
   52 [testenv:bashate]
   53 skip_install = True
   54 usedevelop = False
   55 commands = bash {toxinidir}/tools/bashate.sh
   56 
   57 [testenv:pep8]
   58 commands =
   59   {[testenv:flake8]commands}
   60   {[testenv:bandit]commands}
   61   {[testenv:bashate]commands}
   62   {[testenv:checkniceness]commands}
   63 
   64 [testenv:docs]
   65 description = Builds api-ref, api-guide, releasenotes and devdocs
   66 commands =
   67   {[testenv:devdocs]commands}
   68   {[testenv:api-ref]commands}
   69   {[testenv:releasenotes]commands}
   70 
   71 [testenv:pdf-docs]
   72 envdir = {toxworkdir}/docs
   73 whitelist_externals =
   74   make
   75   rm
   76 commands =
   77   rm -rf doc/build/pdf
   78   sphinx-build -W -b latex doc/source doc/build/pdf
   79   make -C doc/build/pdf
   80 
   81 [testenv:api-ref]
   82 description = Called from CI scripts to test and publish the API Ref
   83 commands =
   84   rm -rf api-ref/build
   85   {[testenv:checkjson]commands}
   86   sphinx-build -W -b html -d api-ref/build/doctrees \
   87     api-ref/source api-ref/build/html
   88 
   89 [testenv:releasenotes]
   90 description = Called from CI script to test and publish the Release Notes
   91 commands =
   92   rm -rf releasenotes/build
   93   sphinx-build -a -E -W -d releasenotes/build/doctrees -b html \
   94     releasenotes/source releasenotes/build/html
   95 
   96 [testenv:devdocs]
   97 description = Builds developer documentation
   98 commands =
   99   rm -rf doc/build doc/source/contributor/api
  100   {[testenv:checkjson]commands}
  101   python setup.py build_sphinx
  102 
  103 [testenv:checkniceness]
  104 skip_install = True
  105 usedevelop = False
  106 description = Validates (pep-like) documenation
  107 commands =
  108   rm -rf {toxinidir}/doc/source/contributor/api {toxinidir}/doc/build \
  109     {toxinidir}/api-ref/build {toxinidir}/releasenotes/build
  110   doc8 --file-encoding utf-8 {toxinidir}/doc
  111   doc8 --file-encoding utf-8 {toxinidir}/api-ref
  112   doc8 --file-encoding utf-8 {toxinidir}/releasenotes
  113 
  114 [testenv:checkjson]
  115 description = Validates all json samples inside doc folder
  116 deps =
  117 skip_install = True
  118 usedevelop = False
  119 whitelist_externals =
  120   python
  121   bash
  122 commands =
  123   bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
  124   bash -c '! find doc/ -type f -name *.json | \
  125     xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
  126 
  127 [testenv:genconfig]
  128 description = Generates sample configuration file for monasca-api
  129 commands = oslo-config-generator --config-file=config-generator/monasca-api.conf
  130 
  131 [testenv:genpolicy]
  132 description = Generates sample policy.json file for monasca-api
  133 commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
  134 
  135 [testenv:venv]
  136 commands = {posargs}
  137 
  138 [testenv:bindep]
  139 deps = bindep
  140 commands = bindep test
  141 
  142 [flake8]
  143 # TODO: ignored checks should be enabled in the future
  144 # H201  no 'except:' at least use 'except Exception:'
  145 # H302  import only modules
  146 # H405  multi line docstring summary not separated with an empty line
  147 # W504 line break after binary operator
  148 ignore = F821,H201,H302,H405,W504
  149 # H106: Don't put vim configuration in source files
  150 # H203: Use assertIs(Not)None to check for None
  151 # H204: Use assert(Not)Equal to check for equality.
  152 # H205: Use assert(Greater|Less)(Equal) for comparison.
  153 enable-extensions=H106,H203,H204,H205
  154 max-complexity = 50
  155 max-line-length = 100
  156 builtins = _
  157 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build
  158 show-source = True
  159 
  160 [hacking]
  161 local-check-factory = monasca_api.hacking.checks.factory
  162 import_exceptions =
  163   six.moves
  164 
  165 [flake8:local-plugins]
  166 extension =
  167   B319 = checks:no_xrange
  168 paths = ./monasca_api/hacking
  169 
  170 [testenv:lower-constraints]
  171 deps =
  172   -c{toxinidir}/lower-constraints.txt
  173   -r{toxinidir}/test-requirements.txt
  174   -r{toxinidir}/requirements.txt
  175   .[influxdb,cassandra]